Updated to Drupal 8.5. Core Media not yet in use.
[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  */
13 class BulkFormUpdateTest extends UpdatePathTestBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   protected function setDatabaseDumpFiles() {
19     $this->databaseDumpFiles = [
20       __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
21       __DIR__ . '/../../../fixtures/update/legacy-bulk-form-update.php'
22     ];
23   }
24
25   /**
26    * Tests the updating of dependencies for Views using the bulk_form plugin.
27    */
28   public function testBulkFormDependencies() {
29     $module_dependencies = View::load('legacy_bulk_form')->getDependencies()['module'];
30
31     $this->assertTrue(in_array('system', $module_dependencies));
32
33     $this->runUpdates();
34
35     $module_dependencies = View::load('legacy_bulk_form')->getDependencies()['module'];
36
37     $this->assertFalse(in_array('system', $module_dependencies));
38   }
39
40 }