X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=tests%2FWallabag%2FCoreBundle%2FController%2FSecurityControllerTest.php;h=2cf596d46734eb43b8ecd327a61611ceff039a50;hb=6fb06904ecde15b1b07d0a2af945338b416cf0e2;hp=f503ff4bd8daff2bd2d64209d643d2d0e231d410;hpb=d37bb05c881bfdbeb1144b327edd4dcc2cbb163f;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()); + } }