]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php
Add simple test
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Controller / SecurityControllerTest.php
index 03355f5abde2d02820ea5ce842c8938dccbe8dda..08f4676ed010d2b3db60410c6bbc4fe4a057dff4 100644 (file)
@@ -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]);
+    }
 }