Added tests

This commit is contained in:
Nicolas Lœuillet
2016-11-07 10:26:05 +01:00
committed by Jeremy Benoist
parent f052f1fd57
commit 65cd8a4a9a
3 changed files with 78 additions and 6 deletions

View File

@ -25,14 +25,14 @@ class RedirectTest extends \PHPUnit_Framework_TestCase
{
$redirectUrl = $this->redirect->to(null, 'fallback');
$this->assertEquals('fallback', $redirectUrl);
$this->assertEquals(null, $redirectUrl);
}
public function testRedirectToNullWithoutFallback()
{
$redirectUrl = $this->redirect->to(null);
$this->assertEquals($this->routerMock->generate('homepage'), $redirectUrl);
$this->assertEquals(null, $redirectUrl);
}
public function testRedirectToValidUrl()