Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / block / tests / src / Functional / Update / BlockConditionMissingSchemaUpdateTest.php
1 <?php
2
3 namespace Drupal\Tests\block\Functional\Update;
4
5 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
6
7 /**
8  * Tests the upgrade path for block with conditions missing context.
9  *
10  * @see https://www.drupal.org/node/2811519
11  *
12  * @group Update
13  */
14 class BlockConditionMissingSchemaUpdateTest extends UpdatePathTestBase {
15
16   /**
17    * This test does not have a failed update but the configuration has missing
18    * schema so can not do the full post update testing offered by
19    * UpdatePathTestBase.
20    *
21    * @var bool
22    *
23    * @see \Drupal\system\Tests\Update\UpdatePathTestBase::runUpdates()
24    */
25   protected $checkFailedUpdates = FALSE;
26
27   /**
28    * {@inheritdoc}
29    */
30   protected static $modules = ['block_test', 'language'];
31
32   /**
33    * {@inheritdoc}
34    */
35   protected function setDatabaseDumpFiles() {
36     $this->databaseDumpFiles = [
37       __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
38       __DIR__ . '/../../../fixtures/update/drupal-8.block-test-enabled-missing-schema.php',
39     ];
40   }
41
42   /**
43    * Tests that block context mapping is updated properly.
44    */
45   public function testUpdateHookN() {
46     $this->runUpdates();
47     $this->drupalGet('<front>');
48     // If the block is fixed by block_post_update_fix_negate_in_conditions()
49     // then it will be visible.
50     $this->assertText('Test missing schema on conditions');
51   }
52
53 }