Skip to content
Snippets Groups Projects
Commit 43b39d9c authored by mondrake's avatar mondrake
Browse files

Update file DrupalComponentTest.php

parent 51f471d8
No related branches found
No related tags found
1 merge request!7632Update file DrupalComponentTest.php
......@@ -38,12 +38,12 @@ public function testNoCoreInComponentTests() {
/**
* Tests LICENSE.txt is present and has the correct content.
*
* @param $component_path
* @param string $component_path
* The path to the component.
*
* @dataProvider \Drupal\Tests\Component\DrupalComponentTest::getComponents
* @dataProvider getComponents
*/
public function testComponentLicense($component_path) {
public function testComponentLicense(string $component_path): void {
$this->assertFileExists($component_path . DIRECTORY_SEPARATOR . 'LICENSE.txt');
$this->assertSame('e84dac1d9fbb5a4a69e38654ce644cea769aa76b', hash_file('sha1', $component_path . DIRECTORY_SEPARATOR . 'LICENSE.txt'));
}
......@@ -53,7 +53,7 @@ public function testComponentLicense($component_path) {
*
* @return array
*/
public function getComponents() {
public static function getComponents(): array {
$root_component_path = dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__))) . '/lib/Drupal/Component';
$component_paths = [];
foreach (new \DirectoryIterator($root_component_path) as $file) {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment