BulkFormUpdateTest.php in Drupal 8
File
core/modules/views/tests/src/Functional/Update/BulkFormUpdateTest.php
View source
<?php
namespace Drupal\Tests\views\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
use Drupal\views\Entity\View;
class BulkFormUpdateTest extends UpdatePathTestBase {
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
__DIR__ . '/../../../fixtures/update/legacy-bulk-form-update.php',
];
}
public function testBulkFormDependencies() {
$module_dependencies = View::load('legacy_bulk_form')
->getDependencies()['module'];
$this
->assertTrue(in_array('system', $module_dependencies));
$this
->runUpdates();
$module_dependencies = View::load('legacy_bulk_form')
->getDependencies()['module'];
$this
->assertFalse(in_array('system', $module_dependencies));
}
}