You are here

public function DblogNoLogsAvailableUpgradeTest::testDblogUpgradePath in Drupal 8

Tests that no logs available text is now using a custom area.

File

core/modules/dblog/tests/src/Functional/Update/DblogNoLogsAvailableUpgradeTest.php, line 30

Class

DblogNoLogsAvailableUpgradeTest
Test the upgrade path of changing the empty text area for watchdog view.

Namespace

Drupal\Tests\dblog\Functional\Update

Code

public function testDblogUpgradePath() {
  $this
    ->runUpdates();
  $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']);
}