public function FilterCrudTest::testDisableFallbackFormat in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/filter/src/Tests/FilterCrudTest.php \Drupal\filter\Tests\FilterCrudTest::testDisableFallbackFormat()
Tests disabling the fallback text format.
File
- core/
modules/ filter/ src/ Tests/ FilterCrudTest.php, line 80 - Contains \Drupal\filter\Tests\FilterCrudTest.
Class
- FilterCrudTest
- Tests creation, loading, updating, deleting of text formats and filters.
Namespace
Drupal\filter\TestsCode
public function testDisableFallbackFormat() {
$this
->installConfig([
'filter',
]);
$message = '\\LogicException with message "The fallback text format \'plain_text\' cannot be disabled." was thrown.';
try {
FilterFormat::load('plain_text')
->disable();
$this
->fail($message);
} catch (\LogicException $e) {
$this
->assertIdentical($e
->getMessage(), "The fallback text format 'plain_text' cannot be disabled.", $message);
}
}