public function TextFormatElementFormTest::testTextFormatElement in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/filter/src/Tests/TextFormatElementFormTest.php \Drupal\filter\Tests\TextFormatElementFormTest::testTextFormatElement()
Tests that values are returned.
File
- core/
modules/ filter/ src/ Tests/ TextFormatElementFormTest.php, line 113 - Contains \Drupal\filter\Tests\TextFormatElementFormTest.
Class
- TextFormatElementFormTest
- Tests PathElement validation and conversion functionality.
Namespace
Drupal\filter\TestsCode
public function testTextFormatElement() {
/* @var \Drupal\Core\Form\FormBuilder $form_builder */
$form_builder = $this->container
->get('form_builder');
$form = $form_builder
->getForm($this);
$output = $this
->render($form);
$this
->setRawContent($output);
$this
->assertFieldByName('textformat[value]');
$this
->assertRaw('<h4>Full HTML</h4>');
$this
->assertRaw('<h4>Filtered HTML</h4>');
$this
->assertRaw('<h4>Test format</h4>');
$this
->assertNoPattern('|<h4[^>]*></h4>|', 'No empty H4 element found.');
}