You are here

public function BrowserTestBaseTest::testProfileModules in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php \Drupal\FunctionalTests\BrowserTestBaseTest::testProfileModules()

Ensures we can't access modules we shouldn't be able to after install.

File

core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php, line 709

Class

BrowserTestBaseTest
Tests BrowserTestBase functionality.

Namespace

Drupal\FunctionalTests

Code

public function testProfileModules() {
  $this
    ->expectException(\InvalidArgumentException::class);
  $this
    ->expectExceptionMessage('The module demo_umami_content does not exist.');
  $this
    ->assertFileExists('core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.info.yml');
  \Drupal::service('extension.list.module')
    ->getPathname('demo_umami_content');
}