mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
fix: incorrect test
The second call for add `exampleRoute` would be ignored.
This commit is contained in:
parent
596b2e949d
commit
daa1b7c250
@ -73,12 +73,12 @@ final class RedirectResponseTest extends CIUnitTestCase
|
||||
$this->assertTrue($response->hasHeader('Location'));
|
||||
$this->assertSame('http://example.com/index.php/exampleRoute', $response->getHeaderLine('Location'));
|
||||
|
||||
$this->routes->add('exampleRoute', 'Home::index', ['as' => 'home']);
|
||||
$this->routes->add('exampleRoute2', 'Home::index', ['as' => 'home']);
|
||||
|
||||
$response->route('home');
|
||||
|
||||
$this->assertTrue($response->hasHeader('Location'));
|
||||
$this->assertSame('http://example.com/index.php/exampleRoute', $response->getHeaderLine('Location'));
|
||||
$this->assertSame('http://example.com/index.php/exampleRoute2', $response->getHeaderLine('Location'));
|
||||
}
|
||||
|
||||
public function testRedirectRouteBadNamedRoute()
|
||||
|
Loading…
x
Reference in New Issue
Block a user