function 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 43
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'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.