Skip to content

Commit

Permalink
test: update URLs in assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Feb 23, 2023
1 parent b46e177 commit 43e8df1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/system/CodeIgniterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public function testRunForceSecure()
$codeigniter->run();
ob_get_clean();

$this->assertSame('https://example.com/', $response->header('Location')->getValue());
$this->assertSame('https://example.com/index.php/', $response->header('Location')->getValue());
}

public function testRunRedirectionWithNamed()
Expand Down Expand Up @@ -549,7 +549,7 @@ public function testStoresPreviousURL()
ob_get_clean();

$this->assertArrayHasKey('_ci_previous_url', $_SESSION);
$this->assertSame('http://example.com/index.php', $_SESSION['_ci_previous_url']);
$this->assertSame('http://example.com/index.php/', $_SESSION['_ci_previous_url']);
}

public function testNotStoresPreviousURL()
Expand Down
6 changes: 3 additions & 3 deletions tests/system/HTTP/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,23 +172,23 @@ public function testSetLink()
$response->setLink($pager);

$this->assertSame(
'<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"',
'<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->assertSame(
'<http://example.com/test/index.php?page=2>; rel="next",<http://example.com/test/index.php?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->assertSame(
'<http://example.com/test/index.php?page=1>; rel="first",<http://example.com/test/index.php?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

0 comments on commit 43e8df1

Please sign in to comment.