3 namespace Drupal\Tests\system\Functional\Update;
5 use Drupal\Core\Site\Settings;
6 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
9 * Tests system_update_8300().
14 class InstallProfileSystemInstall8300Test extends UpdatePathTestBase {
19 protected function setDatabaseDumpFiles() {
20 $this->databaseDumpFiles = [
21 __DIR__ . '/../../../../tests/fixtures/update/drupal-8.bare.standard.php.gz',
26 * Ensures that the system_update_8300() runs as expected.
28 * @expectedDeprecation To access the install profile in Drupal 8 use \Drupal::installProfile() or inject the install_profile container parameter into your service. See https://www.drupal.org/node/2538996
30 public function testUpdate() {
31 // Ensure the BC layers work and settings.php and configuration is in the
32 // expected state before updating.
33 $this->assertEqual('standard', \Drupal::installProfile());
34 $this->assertEqual('standard', Settings::get('install_profile'), 'The install profile has not been written to settings.php.');
35 $this->assertFalse($this->config('core.extension')->get('profile'), 'The install profile is not present in core.extension configuration.');
38 // Confirm that Drupal recognizes this distribution as the current profile.
39 $this->assertEqual('standard', \Drupal::installProfile());
40 $this->assertEqual('standard', Settings::get('install_profile'), 'The install profile has not been written to settings.php.');
41 $this->assertEqual('standard', $this->config('core.extension')->get('profile'), 'The install profile has been written to core.extension configuration.');