You are here

public function InstallProfileTest::testSwitch in Helper 8

Tests switching profiles.

@covers ::switch

File

tests/src/Kernel/InstallProfileTest.php, line 46

Class

InstallProfileTest
Tests the install profile helper.

Namespace

Drupal\Tests\helper\Kernel

Code

public function testSwitch() {
  $this
    ->assertInstallProfile('testing');
  $this
    ->assertSame(SCHEMA_UNINSTALLED, drupal_get_installed_schema_version('minimal'));
  $this
    ->assertSame(SCHEMA_UNINSTALLED, drupal_get_installed_schema_version('standard'));
  $this->installProfile
    ->switch('minimal');
  $this
    ->assertInstallProfile('minimal', 8000);
  $this
    ->assertSame(SCHEMA_UNINSTALLED, drupal_get_installed_schema_version('standard'));
  $this
    ->assertSame(SCHEMA_UNINSTALLED, drupal_get_installed_schema_version('testing'));
}