diff --git a/Classes/Utility/Tests/LinkUtility.php b/Classes/Utility/Tests/LinkUtility.php index fa711d7..4b57199 100644 --- a/Classes/Utility/Tests/LinkUtility.php +++ b/Classes/Utility/Tests/LinkUtility.php @@ -94,6 +94,10 @@ public static function getRedundantLinkNames(array $elements): array /** @var \DOMElement $element */ foreach ($elements as $element) { + if (!$element) { + continue; + } + if (StringUtility::stripNewLines($element->textContent) !== '' && !in_array($element->textContent, $linkNames) ) { diff --git a/composer.json b/composer.json index 3192880..b31b69c 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,10 @@ "symfony/property-info": "^5.4", "ext-dom": "*" }, + "require-dev": { + "typo3/testing-framework": "^6.9.0", + "friendsofphp/php-cs-fixer": "^3.0" + }, "replace": { "typo3-ter/uw-a11y-check": "self.version" }, @@ -38,7 +42,11 @@ }, "config": { "vendor-dir": ".Build/vendor", - "bin-dir": ".Build/bin" + "bin-dir": ".Build/bin", + "allow-plugins": { + "typo3/cms-composer-installers": true, + "typo3/class-alias-loader": true + } }, "extra": { "typo3/cms": { @@ -46,10 +54,5 @@ "app-dir": ".Build", "web-dir": ".Build/public" } - }, - "scripts": { - "post-autoload-dump": [ - "TYPO3\\TestingFramework\\Composer\\ExtensionTestEnvironment::prepare" - ] } }