X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FController%2FSecurityControllerTest.php;h=08f4676ed010d2b3db60410c6bbc4fe4a057dff4;hb=8541b3c4fdf35788129483060499fef50818222c;hp=03355f5abde2d02820ea5ce842c8938dccbe8dda;hpb=ee4442f42a36d2cfd7add334983a8e126718a788;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php b/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php index 03355f5a..08f4676e 100644 --- a/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php @@ -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', $crawler->filter('body')->extract(['_text'])[0]); + } }