You are here

protected function InstallProfileTest::assertInstallProfile in Helper 8

Asserts the currently installed profile.

Parameters

string $expected_profile: The expected install profile.

int $expected_schema_version: (optional) The expected schema version for the install profile.

1 call to InstallProfileTest::assertInstallProfile()
InstallProfileTest::testSwitch in tests/src/Kernel/InstallProfileTest.php
Tests switching profiles.

File

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

Class

InstallProfileTest
Tests the install profile helper.

Namespace

Drupal\Tests\helper\Kernel

Code

protected function assertInstallProfile($expected_profile, $expected_schema_version = NULL) {
  $this
    ->assertSame($expected_profile, \Drupal::installProfile());
  if (isset($expected_schema_version)) {
    $this
      ->assertSame($expected_schema_version, drupal_get_installed_schema_version($expected_profile));
  }
}