X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FHelper%2FRedirectTest.php;h=04e1a59c83fe1ca4371013e400db4aa1b5c71755;hb=778543311f5efde4c99321f257c5a9c34a7dea5f;hp=f420d06aefd6293b73807d3952208c0b5c0dbc4e;hpb=d61fd8be4ffdbba8d0fd02468075602a26dfde1a;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/Helper/RedirectTest.php b/tests/Wallabag/CoreBundle/Helper/RedirectTest.php index f420d06a..04e1a59c 100644 --- a/tests/Wallabag/CoreBundle/Helper/RedirectTest.php +++ b/tests/Wallabag/CoreBundle/Helper/RedirectTest.php @@ -2,13 +2,14 @@ namespace Tests\Wallabag\CoreBundle\Helper; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; +use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Wallabag\CoreBundle\Entity\Config; -use Wallabag\UserBundle\Entity\User; use Wallabag\CoreBundle\Helper\Redirect; -use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; +use Wallabag\UserBundle\Entity\User; -class RedirectTest extends \PHPUnit_Framework_TestCase +class RedirectTest extends TestCase { /** @var \PHPUnit_Framework_MockObject_MockObject */ private $routerMock; @@ -56,21 +57,21 @@ class RedirectTest extends \PHPUnit_Framework_TestCase { $redirectUrl = $this->redirect->to(null, 'fallback'); - $this->assertEquals('fallback', $redirectUrl); + $this->assertSame('fallback', $redirectUrl); } public function testRedirectToNullWithoutFallback() { $redirectUrl = $this->redirect->to(null); - $this->assertEquals($this->routerMock->generate('homepage'), $redirectUrl); + $this->assertSame($this->routerMock->generate('homepage'), $redirectUrl); } public function testRedirectToValidUrl() { $redirectUrl = $this->redirect->to('/unread/list'); - $this->assertEquals('/unread/list', $redirectUrl); + $this->assertSame('/unread/list', $redirectUrl); } public function testWithNotLoggedUser() @@ -78,7 +79,7 @@ class RedirectTest extends \PHPUnit_Framework_TestCase $redirect = new Redirect($this->routerMock, new TokenStorage()); $redirectUrl = $redirect->to('/unread/list'); - $this->assertEquals('/unread/list', $redirectUrl); + $this->assertSame('/unread/list', $redirectUrl); } public function testUserForRedirectToHomepage() @@ -87,7 +88,7 @@ class RedirectTest extends \PHPUnit_Framework_TestCase $redirectUrl = $this->redirect->to('/unread/list'); - $this->assertEquals($this->routerMock->generate('homepage'), $redirectUrl); + $this->assertSame($this->routerMock->generate('homepage'), $redirectUrl); } public function testUserForRedirectWithIgnoreActionMarkAsRead() @@ -96,7 +97,7 @@ class RedirectTest extends \PHPUnit_Framework_TestCase $redirectUrl = $this->redirect->to('/unread/list', '', true); - $this->assertEquals('/unread/list', $redirectUrl); + $this->assertSame('/unread/list', $redirectUrl); } public function testUserForRedirectNullWithFallbackWithIgnoreActionMarkAsRead() @@ -105,6 +106,6 @@ class RedirectTest extends \PHPUnit_Framework_TestCase $redirectUrl = $this->redirect->to(null, 'fallback', true); - $this->assertEquals('fallback', $redirectUrl); + $this->assertSame('fallback', $redirectUrl); } }