X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FController%2FSecurityControllerTest.php;h=2cf596d46734eb43b8ecd327a61611ceff039a50;hb=b4d81c91de537370265c7a09b963cab49af629a8;hp=f503ff4bd8daff2bd2d64209d643d2d0e231d410;hpb=23634d5d842dabcf5d7475e2becb7e127824239e;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php b/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php index f503ff4b..2cf596d4 100644 --- a/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php @@ -36,7 +36,7 @@ class SecurityControllerTest extends WallabagCoreTestCase $em->persist($user); $em->flush(); - $this->logInAs('admin'); + $this->logInAsUsingHttp('admin'); $crawler = $client->request('GET', '/config'); $this->assertContains('scheb_two_factor.trusted', $crawler->filter('body')->extract(['_text'])[0]); @@ -69,4 +69,19 @@ class SecurityControllerTest extends WallabagCoreTestCase $this->assertTrue($user->isTrustedComputer('ABCDEF')); $this->assertFalse($user->isTrustedComputer('FEDCBA')); } + + public function testEnabledRegistration() + { + $client = $this->getClient(); + + if (!$client->getContainer()->getParameter('fosuser_registration')) { + $this->markTestSkipped('fosuser_registration is not enabled.'); + + return; + } + + $client->followRedirects(); + $crawler = $client->request('GET', '/register'); + $this->assertContains('registration.submit', $client->getResponse()->getContent()); + } }