public function RegistrationTest::testHtml in Legal 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/RegistrationTest.php \Drupal\Tests\legal\Functional\RegistrationTest::testHtml()
Test if T&Cs displays as HTML correctly.
File
- tests/
src/ Functional/ RegistrationTest.php, line 97
Class
- RegistrationTest
- Tests a user creating an account.
Namespace
Drupal\Tests\legal\FunctionalCode
public function testHtml() {
// Set conditions to display in an un-editable HTML text area.
$this
->config('legal.settings')
->set('registration_terms_style', 2)
->set('registration_container', 0)
->save();
// Go to registration page.
$this
->drupalGet('user/register');
// Check T&Cs displayed as HTML.
$this
->assertSession()
->elementContains('css', '#user-register-form > div.legal-terms', $this->conditions);
}