3 namespace Drupal\Tests\drupal_system_listing_compatible_test\Kernel;
5 use Drupal\KernelTests\KernelTestBase;
8 * Verifies that tests in installation profile modules are found and may use
9 * another profile for running tests.
11 * @group drupal_system_listing_compatible_test
13 class SystemListingCrossProfileCompatibleTest extends KernelTestBase {
16 * Attempt to enable a module from the Testing profile.
18 * This test uses the Minimal profile, but enables a module from the Testing
19 * profile to confirm that a different profile can be used for running tests.
23 public static $modules = ['drupal_system_cross_profile_test'];
26 * Use the Minimal profile.
28 * This test needs to use a different installation profile than the test which
29 * asserts that this test is found.
31 * @see \Drupal\simpletest\Tests\InstallationProfileModuleTestsTest
35 protected $profile = 'minimal';
40 protected function setUp() {
43 $this->setInstallProfile($this->profile);
47 * Non-empty test* method required to executed the test case class.
49 public function testSystemListing() {
50 /** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
51 $module_handler = $this->container->get('module_handler');
52 $this->assertTrue($module_handler->moduleExists('drupal_system_cross_profile_test'), 'Module installed from different profile');