class SecurityControllerTest extends WallabagCoreTestCase
{
+ public function testLoginWithEmail()
+ {
+ $this->logInAsUsingHttp('bigboss@wallabag.org');
+ $client = $this->getClient();
+ $client->followRedirects();
+
+ $crawler = $client->request('GET', '/config');
+ $this->assertContains('config.form_rss.description', $crawler->filter('body')->extract(['_text'])[0]);
+ }
+
public function testLoginWithout2Factor()
{
$this->logInAs('admin');
$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();
+ $client->request('GET', '/register');
+ $this->assertContains('registration.submit', $client->getResponse()->getContent());
+ }
}