Add simple test

This commit is contained in:
Nicolas Lœuillet 2016-08-24 10:28:43 +02:00
parent ee4442f42a
commit 8541b3c4fd
No known key found for this signature in database
GPG key ID: 5656BE27E1E34D0A
2 changed files with 16 additions and 1 deletions

View file

@ -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()
{

View 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]);
}
}