3 namespace Drupal\Tests\system\Kernel\Installer;
5 use Drupal\KernelTests\KernelTestBase;
8 * Tests that we handle the absence of a module dependency during install.
12 class InstallerMissingDependenciesTest extends KernelTestBase {
17 public static $modules = ['system'];
20 * Verifies that the exception message in the profile step is correct.
22 public function testSetUpWithMissingDependencies() {
23 // Prime the drupal_get_filename() static cache with the location of the
24 // testing profile as it is not the currently active profile and we don't
25 // yet have any cached way to retrieve its location.
26 // @todo Remove as part of https://www.drupal.org/node/2186491
27 drupal_get_filename('profile', 'testing_missing_dependencies', 'core/profiles/testing_missing_dependencies/testing_missing_dependencies.info.yml');
29 $info = drupal_verify_profile([
30 'parameters' => ['profile' => 'testing_missing_dependencies'],
31 'profile_info' => install_profile_info('testing_missing_dependencies'),
34 $message = $info['required_modules']['description']->render();
35 $this->assertContains('Missing_module1', $message);
36 $this->assertContains('Missing_module2', $message);