function OtherInstallationProfileTestsTest::testOtherInstallationProfile

Tests that tests located in another installation profile appear.

@expectedDeprecation Drupal\simpletest\TestDiscovery is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Test\TestDiscovery instead. See https://www.drupal.org/node/2949692

File

core/modules/simpletest/tests/src/Functional/OtherInstallationProfileTestsTest.php, line 60

Class

OtherInstallationProfileTestsTest
Verifies that tests in other installation profiles are found.

Namespace

Drupal\Tests\simpletest\Functional

Code

public function testOtherInstallationProfile() {
    // Assert the existence of a test in a different installation profile than
    // the current.
    $this->drupalGet(Url::fromRoute('simpletest.test_form'));
    $this->assertText('Tests Standard installation profile expectations.');
    // Assert the existence of a test for a module in a different installation
    // profile than the current.
    $this->assertText('Drupal\\Tests\\drupal_system_listing_compatible_test\\Kernel\\SystemListingCrossProfileCompatibleTest');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.