public function DrupalComponentTest::testComponentLicence in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/DrupalComponentTest.php \Drupal\Tests\Component\DrupalComponentTest::testComponentLicence()
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 testComponentLicence($component_path) {
$this
->assertFileExists($component_path . DIRECTORY_SEPARATOR . 'LICENSE.txt');
$this
->assertSame('e84dac1d9fbb5a4a69e38654ce644cea769aa76b', hash_file('sha1', $component_path . DIRECTORY_SEPARATOR . 'LICENSE.txt'));
}