mirror of
https://github.com/wallabag/wallabag.git
synced 2025-03-29 14:25:29 +00:00
Add simple test
This commit is contained in:
parent
ee4442f42a
commit
8541b3c4fd
2 changed files with 16 additions and 1 deletions
|
@ -33,7 +33,7 @@ class InstallCommandTest extends WallabagCoreTestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* Ensure next tests will have a clean database
|
||||
* Ensure next tests will have a clean database.
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue