Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / system / tests / src / Kernel / Installer / InstallerDependenciesResolutionTest.php
1 <?php
2
3 namespace Drupal\Tests\system\Kernel\Installer;
4
5 use Drupal\KernelTests\KernelTestBase;
6
7 /**
8  * Tests that we handle module dependency resolution during install.
9  *
10  * @group Installer
11  */
12 class InstallerDependenciesResolutionTest extends KernelTestBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   public static $modules = ['system'];
18
19   /**
20    * Verifies that the exception message in the profile step is correct.
21    */
22   public function testDependenciesResolution() {
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');
28
29     $info = drupal_verify_profile([
30       'parameters' => ['profile' => 'testing_missing_dependencies'],
31       'profile_info' => install_profile_info('testing_missing_dependencies'),
32     ]);
33
34     $message = $info['required_modules']['description']->render();
35     $this->assertContains('Fictional', $message);
36     $this->assertContains('Missing_module1', $message);
37     $this->assertContains('Missing_module2', $message);
38     $this->assertNotContains('Block', $message);
39     $this->assertNotContains('Node', $message);
40   }
41
42 }