function ModuleInfoTest::testTestModulePackages

Tests that non-hidden test modules use their expected package.

Attributes

#[DataProvider('providerTestTestModulePackages')]

File

core/tests/Drupal/Tests/Core/Extension/ModuleInfoTest.php, line 38

Class

ModuleInfoTest
Tests that core module info files have the expected keys.

Namespace

Drupal\Tests\Core\Extension

Code

public function testTestModulePackages(string $filename, string $expected_package) : void {
  $info = Yaml::decode(file_get_contents($filename));
  $this->assertSame($expected_package, $info['package'] ?? NULL);
}

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