aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2016-08-24 11:13:00 +0200
committerGitHub <noreply@github.com>2016-08-24 11:13:00 +0200
commita1ab7d1d32cb69af563fcec4395fce5217f154f7 (patch)
treeffc13a611a862cce7d74bf6d349bbb2468f33049 /tests
parent1bee9e0760c89756ebab0b67f9ab7efc5c6a709b (diff)
parent8541b3c4fdf35788129483060499fef50818222c (diff)
downloadwallabag-a1ab7d1d32cb69af563fcec4395fce5217f154f7.tar.gz
wallabag-a1ab7d1d32cb69af563fcec4395fce5217f154f7.tar.zst
wallabag-a1ab7d1d32cb69af563fcec4395fce5217f154f7.zip
Merge pull request #2186 from wallabag/addRegistration
Add option to disable registration
Diffstat (limited to 'tests')
-rw-r--r--tests/Wallabag/CoreBundle/Command/InstallCommandTest.php2
-rw-r--r--tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php15
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php
index c0133af4..07ff2772 100644
--- a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php
+++ b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php
@@ -33,7 +33,7 @@ class InstallCommandTest extends WallabagCoreTestCase
33 } 33 }
34 34
35 /** 35 /**
36 * Ensure next tests will have a clean database 36 * Ensure next tests will have a clean database.
37 */ 37 */
38 public static function tearDownAfterClass() 38 public static function tearDownAfterClass()
39 { 39 {
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}