You are here

public function DependencyTest::testProjectNamespaceForDependencies in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testProjectNamespaceForDependencies()
  2. 9 core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testProjectNamespaceForDependencies()

Checks functionality of project namespaces for dependencies.

File

core/modules/system/tests/src/Functional/Module/DependencyTest.php, line 23

Class

DependencyTest
Enable module without dependency enabled.

Namespace

Drupal\Tests\system\Functional\Module

Code

public function testProjectNamespaceForDependencies() {
  $edit = [
    'modules[filter][enable]' => TRUE,
  ];
  $this
    ->drupalGet('admin/modules');
  $this
    ->submitForm($edit, 'Install');

  // Enable module with project namespace to ensure nothing breaks.
  $edit = [
    'modules[system_project_namespace_test][enable]' => TRUE,
  ];
  $this
    ->drupalGet('admin/modules');
  $this
    ->submitForm($edit, 'Install');
  $this
    ->assertModules([
    'system_project_namespace_test',
  ], TRUE);
}