function InstallProfileSystemInstall8300Test::testUpdate

Ensures that the system_update_8300() runs as expected.

@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

File

core/modules/system/tests/src/Functional/Update/InstallProfileSystemInstall8300Test.php, line 35

Class

InstallProfileSystemInstall8300Test
Tests system_update_8300().

Namespace

Drupal\Tests\system\Functional\Update

Code

public function testUpdate() {
    // Ensure the BC layers work and settings.php and configuration is in the
    // expected state before updating.
    $this->assertEqual('standard', \Drupal::installProfile());
    $this->assertEqual('standard', Settings::get('install_profile'), 'The install profile has not been written to settings.php.');
    $this->assertNull($this->config('core.extension')
        ->get('profile'), 'The install profile is not present in core.extension configuration.');
    $this->runUpdates();
    // Confirm that Drupal recognizes this distribution as the current profile.
    $this->assertEqual('standard', \Drupal::installProfile());
    $this->assertEqual('standard', Settings::get('install_profile'), 'The install profile has not been written to settings.php.');
    $this->assertEqual('standard', $this->config('core.extension')
        ->get('profile'), 'The install profile has been written to core.extension configuration.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.