Skip to content

[CI] Fix Acceptance in GHA #1519

[CI] Fix Acceptance in GHA

[CI] Fix Acceptance in GHA #1519

Triggered via pull request July 10, 2024 16:54
Status Success
Total duration 7m 34s
Artifacts

MutationTests.yml

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

Annotations

10 warnings
Mutation tests (8.1, ubuntu-latest): Classes/Converter/JsonCompatibilityConverter.php#L43
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ { $decoded = ''; try { - $decoded = json_decode($dataString, true, 512, JSON_THROW_ON_ERROR); + $decoded = json_decode($dataString, true, 511, JSON_THROW_ON_ERROR); } catch (\JsonException) { // Do nothing as we want to continue with unserialize as a test. }
Mutation tests (8.1, ubuntu-latest): Classes/Converter/JsonCompatibilityConverter.php#L43
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ { $decoded = ''; try { - $decoded = json_decode($dataString, true, 512, JSON_THROW_ON_ERROR); + $decoded = json_decode($dataString, true, 513, JSON_THROW_ON_ERROR); } catch (\JsonException) { // Do nothing as we want to continue with unserialize as a test. }
Mutation tests (8.1, ubuntu-latest): Classes/CrawlStrategy/GuzzleExecutionStrategy.php#L49
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 (8.1, ubuntu-latest): Classes/CrawlStrategy/GuzzleExecutionStrategy.php#L55
Escaped Mutant for Mutator "CatchBlockRemoval": --- Original +++ New @@ @@ $url = (string) $url; $response = $this->getResponse($url, $options); return unserialize($response->getHeaderLine('X-T3Crawler-Meta')); - } catch (RequestException $e) { - $response = $e->getResponse(); - $message = ($response ? $response->getStatusCode() : 0) . chr(32) . ($response ? $response->getReasonPhrase() : $e->getMessage()); - $this->logger->debug(sprintf('Error while opening "%s" - ' . $message, $url), ['crawlerId' => $crawlerId]); - return $message; } catch (ConnectException $e) { $message = $e->getCode() . chr(32) . $e->getMessage(); $this->logger->debug(sprintf('Error while opening "%s" - ' . $message, $url), ['crawlerId' => $crawlerId]);
Mutation tests (8.1, ubuntu-latest): Classes/CrawlStrategy/GuzzleExecutionStrategy.php#L97
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 (8.1, ubuntu-latest): Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L47
Escaped Mutant for Mutator "Ternary": --- Original +++ New @@ @@ { $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 (8.1, ubuntu-latest): Classes/CrawlStrategy/SubProcessExecutionStrategy.php#L60
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 (8.1, 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 (8.1, 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 (8.1, 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; }