Skip to content

Commit

Permalink
Fix dependent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed May 13, 2021
1 parent 1034e69 commit b0e3d35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/system/HTTP/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,23 @@ public function testSetLink()
$response->setLink($pager);

$this->assertEquals(
'<http://example.com/test/?page=1>; rel="first",<http://example.com/test/?page=2>; rel="prev",<http://example.com/test/?page=4>; rel="next",<http://example.com/test/?page=20>; rel="last"',
'<http://example.com/test/index.php?page=1>; rel="first",<http://example.com/test/index.php?page=2>; rel="prev",<http://example.com/test/index.php?page=4>; rel="next",<http://example.com/test/index.php?page=20>; rel="last"',
$response->header('Link')->getValue()
);

$pager->store('default', 1, 10, 200);
$response->setLink($pager);

$this->assertEquals(
'<http://example.com/test/?page=2>; rel="next",<http://example.com/test/?page=20>; rel="last"',
'<http://example.com/test/index.php?page=2>; rel="next",<http://example.com/test/index.php?page=20>; rel="last"',
$response->header('Link')->getValue()
);

$pager->store('default', 20, 10, 200);
$response->setLink($pager);

$this->assertEquals(
'<http://example.com/test/?page=1>; rel="first",<http://example.com/test/?page=19>; rel="prev"',
'<http://example.com/test/index.php?page=1>; rel="first",<http://example.com/test/index.php?page=19>; rel="prev"',
$response->header('Link')->getValue()
);
}
Expand Down
3 changes: 3 additions & 0 deletions tests/system/HTTP/URITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
use CodeIgniter\Test\CIUnitTestCase;
use Config\App;

/**
* @backupGlobals enabled
*/
class URITest extends CIUnitTestCase
{

Expand Down

0 comments on commit b0e3d35

Please sign in to comment.