aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-08-24 10:28:43 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-08-24 10:28:43 +0200
commit8541b3c4fdf35788129483060499fef50818222c (patch)
tree1e6e70882e6da1383754e1004925beb6d0bfec34 /tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php
parentee4442f42a36d2cfd7add334983a8e126718a788 (diff)
downloadwallabag-8541b3c4fdf35788129483060499fef50818222c.tar.gz
wallabag-8541b3c4fdf35788129483060499fef50818222c.tar.zst
wallabag-8541b3c4fdf35788129483060499fef50818222c.zip
Add simple test
Diffstat (limited to 'tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php15
1 files changed, 15 insertions, 0 deletions
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
69 $this->assertTrue($user->isTrustedComputer('ABCDEF')); 69 $this->assertTrue($user->isTrustedComputer('ABCDEF'));
70 $this->assertFalse($user->isTrustedComputer('FEDCBA')); 70 $this->assertFalse($user->isTrustedComputer('FEDCBA'));
71 } 71 }
72
73 public function testEnabledRegistration()
74 {
75 $client = $this->getClient();
76
77 if (!$client->getContainer()->getParameter('fosuser_registration')) {
78 $this->markTestSkipped('fosuser_registration is not enabled.');
79
80 return;
81 }
82
83 $client->followRedirects();
84 $crawler = $client->request('GET', '/register');
85 $this->assertContains('registration.submit', $crawler->filter('body')->extract(['_text'])[0]);
86 }
72} 87}