function InfoParserUnitTest::testProfile
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php \Drupal\Tests\Core\Extension\InfoParserUnitTest::testProfile()
- 8.9.x core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php \Drupal\Tests\Core\Extension\InfoParserUnitTest::testProfile()
- 10 core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php \Drupal\Tests\Core\Extension\InfoParserUnitTest::testProfile()
Tests a profile info file.
File
-
core/
tests/ Drupal/ Tests/ Core/ Extension/ InfoParserUnitTest.php, line 306
Class
- InfoParserUnitTest
- Tests InfoParser class and exception.
Namespace
Drupal\Tests\Core\ExtensionCode
public function testProfile() : void {
$profile = <<<PROFILE_TEST
core_version_requirement: '*'
name: The Perfect Profile
type: profile
description: 'This profile makes Drupal perfect. You should have no complaints.'
PROFILE_TEST;
vfsStream::setup('profiles');
vfsStream::create([
'fixtures' => [
'invalid_profile.info.txt' => $profile,
],
]);
$info = $this->infoParser
->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));
$this->assertFalse($info['core_incompatible']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.