3 namespace Drupal\simpletest\Tests;
5 use Drupal\simpletest\WebTestBase;
8 * Verifies that tests bundled with installation profile modules are found.
12 class InstallationProfileModuleTestsTest extends WebTestBase {
19 public static $modules = ['simpletest'];
22 * An administrative user with permission to adminsiter unit tests.
24 * @var \Drupal\user\UserInterface
29 * Use the Testing profile.
31 * The Testing profile contains drupal_system_listing_compatible_test.test,
33 * - run tests using the Minimal profile (which does not contain the
34 * drupal_system_listing_compatible_test.module)
35 * - but still install the drupal_system_listing_compatible_test.module
36 * contained in the Testing profile.
38 * @see \Drupal\drupal_system_listing_compatible_test\Tests\SystemListingCompatibleTest
40 protected $profile = 'testing';
42 protected function setUp() {
45 $this->adminUser = $this->drupalCreateUser(['administer unit tests']);
46 $this->drupalLogin($this->adminUser);
50 * Tests existence of test case located in an installation profile module.
52 public function testInstallationProfileTests() {
53 $this->drupalGet('admin/config/development/testing');
54 $this->assertText('Drupal\drupal_system_listing_compatible_test\Tests\SystemListingCompatibleTest');
56 'tests[Drupal\drupal_system_listing_compatible_test\Tests\SystemListingCompatibleTest]' => TRUE,
58 $this->drupalPostForm(NULL, $edit, t('Run tests'));
59 $this->assertText('SystemListingCompatibleTest test executed.');