Skip to content

Commit 4519111

Browse files
committed
PagerTest setup consistency fix
1 parent ebb5566 commit 4519111

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

tests/system/Pager/PagerTest.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,20 @@ protected function setUp()
2323
parent::setUp();
2424
helper('url');
2525

26-
$_SERVER['HTTP_HOST'] = 'example.com';
27-
$_GET = [];
28-
$this->config = new Pager();
29-
$this->pager = new \CodeIgniter\Pager\Pager($this->config, Services::renderer());
26+
$_SERVER['HTTP_HOST'] = 'example.com';
27+
$_SERVER['REQUEST_URI'] = '/';
28+
$_GET = [];
29+
30+
$config = new App();
31+
$config->baseURL = 'http://example.com/';
32+
$request = Services::request($config);
33+
$request->uri = new URI('http://example.com');
34+
35+
Services::injectMock('request', $request);
36+
37+
$_GET = [];
38+
$this->config = new Pager();
39+
$this->pager = new \CodeIgniter\Pager\Pager($this->config, Services::renderer());
3040
}
3141

3242
public function testSetPathRemembersPath()

0 commit comments

Comments
 (0)