ViewsDataTableDependencyUpdateTest.php in Drupal 8
File
core/modules/views/tests/src/Functional/Update/ViewsDataTableDependencyUpdateTest.php
View source
<?php
namespace Drupal\Tests\views\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
use Drupal\views\Views;
class ViewsDataTableDependencyUpdateTest extends UpdatePathTestBase {
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.4.0.bare.standard.php.gz',
__DIR__ . '/../../../fixtures/update/views-data-table-dependency.php',
];
}
public function testPostUpdate() {
$this
->runUpdates();
$view = Views::getView('test_table_dependency_update');
$this
->assertEquals([
'module' => [
'views_test_data',
],
], $view
->getDependencies());
}
}