Skip to content

Backport of #1009 #1527

Backport of #1009

Backport of #1009 #1527

Triggered via pull request July 30, 2024 15:00
Status Success
Total duration 4m 24s
Artifacts

MutationTests.yml

on: pull_request
Matrix: Mutation tests
Fit to window
Zoom out
Zoom in

Annotations

12 warnings
Mutation tests (7.4, ubuntu-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Mutation tests (7.4, ubuntu-latest)
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v2, actions/cache@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Mutation tests (7.4, ubuntu-latest): Classes/CrawlStrategy/GuzzleExecutionStrategy.php#L47
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ public function fetchUrlContents(UriInterface $url, string $crawlerId) { $reqHeaders = $this->buildRequestHeaders($crawlerId); - $options = ['headers' => $reqHeaders]; + $options = []; if ($url->getUserInfo()) { $options['auth'] = explode(':', $url->getUserInfo()); }
Mutation tests (7.4, ubuntu-latest): Classes/CrawlStrategy/GuzzleExecutionStrategy.php#L92
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ */ private function buildRequestHeaders(string $crawlerId) : array { - return ['Connection' => 'close', 'X-T3Crawler' => $crawlerId, 'User-Agent' => 'TYPO3 crawler']; + return ['X-T3Crawler' => $crawlerId, 'User-Agent' => 'TYPO3 crawler']; } }
Mutation tests (7.4, ubuntu-latest): Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L49
Escaped Mutant for Mutator "Ternary": --- Original +++ New @@ @@ { $configurationProvider = $configurationProvider ?? GeneralUtility::makeInstance(ExtensionConfigurationProvider::class); $settings = $configurationProvider->getExtensionConfiguration(); - $this->extensionSettings = is_array($settings) ? $settings : []; + $this->extensionSettings = is_array($settings) ? [] : $settings; } /** * Fetches a URL by calling a shell script.
Mutation tests (7.4, ubuntu-latest): Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L62
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ { $url = (string) $url; $parsedUrl = parse_url($url); - if ($parsedUrl === false) { + if ($parsedUrl === true) { $this->logger->debug(sprintf('Could not parse_url() for string "%s"', $url), ['crawlerId' => $crawlerId]); return false; }
Mutation tests (7.4, ubuntu-latest): Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L70
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ $this->logger->debug(sprintf('Could not parse_url() for string "%s"', $url), ['crawlerId' => $crawlerId]); return false; } - if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { + if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['http', 'https'], true)) { $this->logger->debug(sprintf('Scheme does not match for url "%s"', $url), ['crawlerId' => $crawlerId]); return false; }
Mutation tests (7.4, ubuntu-latest): Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L70
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ $this->logger->debug(sprintf('Could not parse_url() for string "%s"', $url), ['crawlerId' => $crawlerId]); return false; } - if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { + if (isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { $this->logger->debug(sprintf('Scheme does not match for url "%s"', $url), ['crawlerId' => $crawlerId]); return false; }
Mutation tests (7.4, ubuntu-latest): Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L70
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ $this->logger->debug(sprintf('Could not parse_url() for string "%s"', $url), ['crawlerId' => $crawlerId]); return false; } - if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { + if (!isset($parsedUrl['scheme']) && !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { $this->logger->debug(sprintf('Scheme does not match for url "%s"', $url), ['crawlerId' => $crawlerId]); return false; }
Mutation tests (7.4, ubuntu-latest): Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L70
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ $this->logger->debug(sprintf('Could not parse_url() for string "%s"', $url), ['crawlerId' => $crawlerId]); return false; } - if (!isset($parsedUrl['scheme']) || !in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { + if (!isset($parsedUrl['scheme']) || in_array($parsedUrl['scheme'], ['', 'http', 'https'], true)) { $this->logger->debug(sprintf('Scheme does not match for url "%s"', $url), ['crawlerId' => $crawlerId]); return false; }
Mutation tests (7.4, ubuntu-latest): Classes/Crawler.php#L38
Escaped Mutant for Mutator "Ternary": --- Original +++ New @@ @@ private $processFilename; public function __construct(?string $processFilename = null) { - $this->processFilename = $processFilename ?: Environment::getVarPath() . '/lock/tx_crawler.proc'; + $this->processFilename = $processFilename ? Environment::getVarPath() . '/lock/tx_crawler.proc' : $processFilename; $this->setDisabled(false); $pathInfo = pathinfo($this->processFilename); GeneralUtility::mkdir_deep($pathInfo['dirname']);
Mutation tests (7.4, ubuntu-latest): Classes/Crawler.php#L38
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ private $processFilename; public function __construct(?string $processFilename = null) { - $this->processFilename = $processFilename ?: Environment::getVarPath() . '/lock/tx_crawler.proc'; + $this->processFilename = $processFilename ?: '/lock/tx_crawler.proc' . Environment::getVarPath(); $this->setDisabled(false); $pathInfo = pathinfo($this->processFilename); GeneralUtility::mkdir_deep($pathInfo['dirname']);