public function LoginTest::testHtml in Legal 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/LoginTest.php \Drupal\Tests\legal\Functional\LoginTest::testHtml()
Test if T&Cs displays as HTML.
File
- tests/
src/ Functional/ LoginTest.php, line 98
Class
- LoginTest
- Tests a user loging into an account and accepting new T&C.
Namespace
Drupal\Tests\legal\FunctionalCode
public function testHtml() {
// Set conditions to display as HTML.
$this
->config('legal.settings')
->set('login_terms_style', 2)
->set('login_container', 0)
->save();
$this
->drupalPostForm('user/login', $this->loginDetails, 'Log in');
// Check T&Cs displayed as HTML.
$this
->assertSession()
->elementContains('css', '#legal-login > div.legal-terms', $this->conditions);
}