You are here

public function DbLogViewsTest::testEmptyText in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/dblog/tests/src/Functional/DbLogViewsTest.php \Drupal\Tests\dblog\Functional\DbLogViewsTest::testEmptyText()
  2. 10 core/modules/dblog/tests/src/Functional/DbLogViewsTest.php \Drupal\Tests\dblog\Functional\DbLogViewsTest::testEmptyText()

Tests the empty text for the watchdog view is not using an input format.

File

core/modules/dblog/tests/src/Functional/DbLogViewsTest.php, line 61

Class

DbLogViewsTest
Generate events and verify dblog entries; verify user access to log reports based on permissions. Using the dblog UI generated by a View.

Namespace

Drupal\Tests\dblog\Functional

Code

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']);
}