Skip to content

ci: Add runTests.sh #1601

ci: Add runTests.sh

ci: Add runTests.sh #1601

Triggered via push October 17, 2024 11:15
Status Success
Total duration 4m 48s
Artifacts
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 "LogicalNot": --- Original +++ New @@ @@ { $url = (string) $url; $parsedUrl = parse_url($url); - 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#L60
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ { $url = (string) $url; $parsedUrl = parse_url($url); - 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#L60
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ { $url = (string) $url; $parsedUrl = parse_url($url); - 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#L60
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { $url = (string) $url; $parsedUrl = parse_url($url); - 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; }