function DrupalComponentTest::testComponentLicense
Same name in other branches
- 10 core/tests/Drupal/Tests/Component/DrupalComponentTest.php \Drupal\Tests\Component\DrupalComponentTest::testComponentLicense()
- 11.x core/tests/Drupal/Tests/Component/DrupalComponentTest.php \Drupal\Tests\Component\DrupalComponentTest::testComponentLicense()
Tests LICENSE.txt is present and has the correct content.
@dataProvider \Drupal\Tests\Component\DrupalComponentTest::getComponents
Parameters
$component_path: The path to the component.
File
-
core/
tests/ Drupal/ Tests/ Component/ DrupalComponentTest.php, line 44
Class
- DrupalComponentTest
- General tests for \Drupal\Component that can't go anywhere else.
Namespace
Drupal\Tests\ComponentCode
public function testComponentLicense($component_path) {
$this->assertFileExists($component_path . DIRECTORY_SEPARATOR . 'LICENSE.txt');
$this->assertSame('e84dac1d9fbb5a4a69e38654ce644cea769aa76b', hash_file('sha1', $component_path . DIRECTORY_SEPARATOR . 'LICENSE.txt'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.