DblogRecentLogsUsingViewsUpdateTest.php in Drupal 8
File
core/modules/dblog/tests/src/Functional/Update/DblogRecentLogsUsingViewsUpdateTest.php
View source
<?php
namespace Drupal\Tests\dblog\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
class DblogRecentLogsUsingViewsUpdateTest extends UpdatePathTestBase {
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
];
}
public function testUpdate() {
$view = \Drupal::entityTypeManager()
->getStorage('view')
->load('watchdog');
$this
->assertNull($view);
$this
->runUpdates();
$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.');
}
}