7ef25863afd222b86ff10cab787d0662327006c8
[yaffs-website] / web / core / modules / views / tests / src / Functional / Update / BulkFormUpdateTest.php
1 <?php
2
3 namespace Drupal\Tests\views\Functional\Update;
4
5 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
6 use Drupal\views\Entity\View;
7
8 /**
9  * Tests Views image style dependencies update.
10  *
11  * @group views
12  * @group legacy
13  */
14 class BulkFormUpdateTest extends UpdatePathTestBase {
15
16   /**
17    * {@inheritdoc}
18    */
19   protected function setDatabaseDumpFiles() {
20     $this->databaseDumpFiles = [
21       __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
22       __DIR__ . '/../../../fixtures/update/legacy-bulk-form-update.php',
23     ];
24   }
25
26   /**
27    * Tests the updating of dependencies for Views using the bulk_form plugin.
28    */
29   public function testBulkFormDependencies() {
30     $module_dependencies = View::load('legacy_bulk_form')->getDependencies()['module'];
31
32     $this->assertTrue(in_array('system', $module_dependencies));
33
34     $this->runUpdates();
35
36     $module_dependencies = View::load('legacy_bulk_form')->getDependencies()['module'];
37
38     $this->assertFalse(in_array('system', $module_dependencies));
39   }
40
41 }