Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / simpletest / src / Tests / InstallationProfileModuleTestsTest.php
index 5d9c22926286c729df0a999ff6c5a2debef970db..113748f18d5ec2bb0c4fedb337c83cceebb2b29f 100644 (file)
@@ -19,7 +19,7 @@ class InstallationProfileModuleTestsTest extends WebTestBase {
   public static $modules = ['simpletest'];
 
   /**
-   * An administrative user with permission to adminsiter unit tests.
+   * An administrative user with permission to administer unit tests.
    *
    * @var \Drupal\user\UserInterface
    */
@@ -35,7 +35,7 @@ class InstallationProfileModuleTestsTest extends WebTestBase {
    * - but still install the drupal_system_listing_compatible_test.module
    *   contained in the Testing profile.
    *
-   * @see \Drupal\drupal_system_listing_compatible_test\Tests\SystemListingCompatibleTest
+   * @see \Drupal\Tests\drupal_system_listing_compatible_test\Kernel\SystemListingCrossProfileCompatibleTest
    *
    * @var string
    */
@@ -53,12 +53,18 @@ class InstallationProfileModuleTestsTest extends WebTestBase {
    */
   public function testInstallationProfileTests() {
     $this->drupalGet('admin/config/development/testing');
-    $this->assertText('Drupal\drupal_system_listing_compatible_test\Tests\SystemListingCompatibleTest');
+    $this->assertText('Drupal\Tests\drupal_system_listing_compatible_test\Kernel\SystemListingCrossProfileCompatibleTest');
     $edit = [
-      'tests[Drupal\drupal_system_listing_compatible_test\Tests\SystemListingCompatibleTest]' => TRUE,
+      'tests[Drupal\Tests\drupal_system_listing_compatible_test\Kernel\SystemListingCrossProfileCompatibleTest]' => TRUE,
     ];
     $this->drupalPostForm(NULL, $edit, t('Run tests'));
-    $this->assertText('SystemListingCompatibleTest test executed.');
+
+    // Verifies that tests in installation profile modules are passed.
+    $element = $this->xpath('//tr[contains(@class, :class)]/td[contains(text(), :value)]', [
+      ':class' => 'simpletest-pass',
+      ':value' => 'Drupal\Tests\drupal_system_listing_compatible_test\Kernel\SystemListingCrossProfileCompatibleTest',
+    ]);
+    $this->assertTrue(!empty($element));
   }
 
 }