3 namespace Drupal\Tests\dblog\Functional\Update;
5 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
8 * Ensures that update hook that creates the watchdog view ran sucessfully.
12 class DblogRecentLogsUsingViewsUpdateTest extends UpdatePathTestBase {
17 protected function setDatabaseDumpFiles() {
18 $this->databaseDumpFiles = [
19 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
24 * Ensures that update hook is run for dblog module.
26 public function testUpdate() {
27 // Make sure the watchog view doesn't exist before the updates.
28 $view = \Drupal::entityTypeManager()->getStorage('view')->load('watchdog');
29 $this->assertNull($view);
33 // Ensure the watchdog view is present after run updates.
34 $view = \Drupal::entityTypeManager()->getStorage('view')->load('watchdog');
35 $displays = $view->get('display');
37 $this->assertIdentical($displays['page']['display_options']['path'], 'admin/reports/dblog', 'Recent logs message view exists.');