fix: incorrect test

The second call for add `exampleRoute` would be ignored.
This commit is contained in:
kenjis 2022-10-07 15:37:39 +09:00
parent 596b2e949d
commit daa1b7c250
No known key found for this signature in database
GPG Key ID: BD254878922AF198

View File

@ -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()