namespace Drupal\Tests\dblog\Functional;
-use Drupal\filter\Entity\FilterFormat;
+use Drupal\views\Views;
/**
* Generate events and verify dblog entries; verify user access to log reports
}
/**
- * {@inheritdoc}
+ * Tests the empty text for the watchdog view is not using an input format.
*/
- public function testDBLogAddAndClear() {
- // Is necesary to create the basic_html format because if absent after
- // delete the logs, a new log entry is created indicating that basic_html
- // format do not exists.
- $basic_html_format = FilterFormat::create([
- 'format' => 'basic_html',
- 'name' => 'Basic HTML',
- 'filters' => [
- 'filter_html' => [
- 'status' => 1,
- 'settings' => [
- 'allowed_html' => '<p> <br> <strong> <a> <em>',
- ],
- ],
- ],
- ]);
- $basic_html_format->save();
-
- parent::testDBLogAddAndClear();
+ public function testEmptyText() {
+ $view = Views::getView('watchdog');
+ $data = $view->storage->toArray();
+ $area = $data['display']['default']['display_options']['empty']['area'];
+
+ $this->assertEqual('text_custom', $area['plugin_id']);
+ $this->assertEqual('area_text_custom', $area['field']);
+ $this->assertEqual('No log messages available.', $area['content']);
}
}