function DblogRecentLogsUsingViewsUpdateTest::testUpdate
Ensures that update hook is run for dblog module.
File
-
core/
modules/ dblog/ tests/ src/ Functional/ Update/ DblogRecentLogsUsingViewsUpdateTest.php, line 27
Class
- DblogRecentLogsUsingViewsUpdateTest
- Ensures that update hook that creates the watchdog view ran successfully.
Namespace
Drupal\Tests\dblog\Functional\UpdateCode
public function testUpdate() {
// Make sure the watchdog view doesn't exist before the updates.
$view = \Drupal::entityTypeManager()->getStorage('view')
->load('watchdog');
$this->assertNull($view);
$this->runUpdates();
// Ensure the watchdog view is present after run updates.
$view = \Drupal::entityTypeManager()->getStorage('view')
->load('watchdog');
$displays = $view->get('display');
$this->assertIdentical($displays['page']['display_options']['path'], 'admin/reports/dblog', 'Recent logs message view exists.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.