623f88047e108925e3e180996cb6d99faaacbf61
[yaffs-website] / web / core / modules / system / tests / src / Functional / Update / InstallProfileSystemInstall8300Test.php
1 <?php
2
3 namespace Drupal\Tests\system\Functional\Update;
4
5 use Drupal\Core\Site\Settings;
6 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
7
8 /**
9  * Tests system_update_8300().
10  *
11  * @group Update
12  */
13 class InstallProfileSystemInstall8300Test extends UpdatePathTestBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   protected function setDatabaseDumpFiles() {
19     $this->databaseDumpFiles = [
20       __DIR__ . '/../../../../tests/fixtures/update/drupal-8.bare.standard.php.gz',
21     ];
22   }
23
24   /**
25    * Ensures that the system_update_8300() runs as expected.
26    */
27   public function testUpdate() {
28     // Ensure the BC layers work and settings.php and configuration is in the
29     // expected state before updating.
30     $this->assertEqual('standard', \Drupal::installProfile());
31     $this->assertEqual('standard', Settings::get('install_profile'), 'The install profile has not been written to settings.php.');
32     $this->assertFalse($this->config('core.extension')->get('profile'), 'The install profile is not present in core.extension configuration.');
33
34     $this->runUpdates();
35     // Confirm that Drupal recognizes this distribution as the current profile.
36     $this->assertEqual('standard', \Drupal::installProfile());
37     $this->assertEqual('standard', Settings::get('install_profile'), 'The install profile has not been written to settings.php.');
38     $this->assertEqual('standard', $this->config('core.extension')->get('profile'), 'The install profile has been written to core.extension configuration.');
39   }
40
41 }