function InfoParserUnitTest::testTestingPackageMissingCoreVersionRequirement
Same name in other branches
- 11.x core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php \Drupal\Tests\Core\Extension\InfoParserUnitTest::testTestingPackageMissingCoreVersionRequirement()
Tests that Testing package modules use a default core_version_requirement.
@covers ::parse
File
-
core/
tests/ Drupal/ Tests/ Core/ Extension/ InfoParserUnitTest.php, line 162
Class
- InfoParserUnitTest
- Tests InfoParser class and exception.
Namespace
Drupal\Tests\Core\ExtensionCode
public function testTestingPackageMissingCoreVersionRequirement() : void {
$missing_core_version_requirement = <<<MISSING_CORE_VERSION_REQUIREMENT
# info.yml for testing core_version_requirement.
package: Testing
version: VERSION
type: module
name: Skynet
MISSING_CORE_VERSION_REQUIREMENT;
vfsStream::setup('modules');
vfsStream::create([
'fixtures' => [
'missing_core_version_requirement.info.txt' => $missing_core_version_requirement,
],
]);
$info_values = $this->infoParser
->parse(vfsStream::url('modules/fixtures/missing_core_version_requirement.info.txt'));
$this->assertSame($info_values['core_version_requirement'], \Drupal::VERSION);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.