mirror of https://github.com/wallabag/wallabag.git
Add simple test
This commit is contained in:
parent
ee4442f42a
commit
8541b3c4fd
|
@ -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()
|
public static function tearDownAfterClass()
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,4 +69,19 @@ class SecurityControllerTest extends WallabagCoreTestCase
|
||||||
$this->assertTrue($user->isTrustedComputer('ABCDEF'));
|
$this->assertTrue($user->isTrustedComputer('ABCDEF'));
|
||||||
$this->assertFalse($user->isTrustedComputer('FEDCBA'));
|
$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 New Issue