function DbLogViewsTest::testEmptyText

Same name in other branches
  1. 9 core/modules/dblog/tests/src/Functional/DbLogViewsTest.php \Drupal\Tests\dblog\Functional\DbLogViewsTest::testEmptyText()
  2. 8.9.x core/modules/dblog/tests/src/Functional/DbLogViewsTest.php \Drupal\Tests\dblog\Functional\DbLogViewsTest::testEmptyText()
  3. 11.x 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 59

Class

DbLogViewsTest
Verifies user access to log reports based on permissions.

Namespace

Drupal\Tests\dblog\Functional

Code

public function testEmptyText() : void {
    $view = Views::getView('watchdog');
    $data = $view->storage
        ->toArray();
    $area = $data['display']['default']['display_options']['empty']['area'];
    $this->assertEquals('text_custom', $area['plugin_id']);
    $this->assertEquals('area_text_custom', $area['field']);
    $this->assertEquals('No log messages available.', $area['content']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.