Skip to content

A new fix in test

A new fix in test #41

Triggered via push October 8, 2024 16:09
Status Success
Total duration 46s
Artifacts 1

tests.yml

on: push
docker-build
24s
docker-build
Matrix: composer-normalize
Matrix: composer-require-checker
Matrix: composer-unused
Matrix: composer-validate
Matrix: linter
Matrix: mutation-tests
Matrix: refactoring
Matrix: static-analysis
Matrix: unit-tests
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
mutation-tests (8.3): src/Action.php#L28
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ if (!\extension_loaded('zip')) { throw new \Exception('ZIP extension is not loaded'); } - $directory = (string) $this->configuration->get('build.directory'); + $directory = $this->configuration->get('build.directory'); if (is_dir($directory)) { throw new \Exception('Directory "' . $directory . '" is already exists'); }
mutation-tests (8.3): src/Action.php#L36
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ throw new \Exception('Directory "' . $directory . '" is already exists'); } // rights - mkdir($directory, 0755, true); + mkdir($directory, 494, true); $ignore = new IgnoreFile(); $zip = new \ZipArchive(); if ($zip->open((string) $this->configuration->get('build.file'), \ZipArchive::CREATE) !== true) {
mutation-tests (8.3): src/Action.php#L36
Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ if (is_dir($directory)) { throw new \Exception('Directory "' . $directory . '" is already exists'); } - // rights - mkdir($directory, 0755, true); + $ignore = new IgnoreFile(); $zip = new \ZipArchive(); if ($zip->open((string) $this->configuration->get('build.file'), \ZipArchive::CREATE) !== true) {
mutation-tests (8.3): src/Action.php#L41
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ mkdir($directory, 0755, true); $ignore = new IgnoreFile(); $zip = new \ZipArchive(); - if ($zip->open((string) $this->configuration->get('build.file'), \ZipArchive::CREATE) !== true) { + if ($zip->open($this->configuration->get('build.file'), \ZipArchive::CREATE) !== true) { throw new \Exception('Failed to create zip archive'); } $rootDirectory = $this->configuration->getRootDirectory();
mutation-tests (8.3): src/Action.php#L47
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ throw new \Exception('Failed to create zip archive'); } $rootDirectory = $this->configuration->getRootDirectory(); - if (is_dir($rootDirectory) && is_readable($rootDirectory) && is_writable($rootDirectory)) { + if ((is_dir($rootDirectory) || is_readable($rootDirectory)) && is_writable($rootDirectory)) { $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootDirectory), \RecursiveIteratorIterator::CHILD_FIRST); foreach ($iterator as $path) { /**
mutation-tests (8.3): src/Action.php#L71
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ * @var \SplFileInfo $path */ if (!$path->isFile()) { - continue; + break; } if (!$ignore->ignores($path->getPathname())) { $zip->addFile($path->getPathname(), str_replace($rootDirectory . \DIRECTORY_SEPARATOR, '', $path->getPathname()));
mutation-tests (8.3): src/Action.php#L75
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ continue; } if (!$ignore->ignores($path->getPathname())) { - $zip->addFile($path->getPathname(), str_replace($rootDirectory . \DIRECTORY_SEPARATOR, '', $path->getPathname())); + $zip->addFile($path->getPathname(), str_replace(\DIRECTORY_SEPARATOR . $rootDirectory, '', $path->getPathname())); } } }
mutation-tests (8.3): src/Action.php#L75
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ continue; } if (!$ignore->ignores($path->getPathname())) { - $zip->addFile($path->getPathname(), str_replace($rootDirectory . \DIRECTORY_SEPARATOR, '', $path->getPathname())); + $zip->addFile($path->getPathname(), str_replace($rootDirectory, '', $path->getPathname())); } } }
mutation-tests (8.3): src/Action.php#L80
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } } } - $zip->close(); + $GITHUB_OUTPUT = (string) $this->configuration->get('GITHUB_OUTPUT'); if (!empty($GITHUB_OUTPUT)) { $name = 'directory_path';
mutation-tests (8.3): src/Action.php#L84
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ } $zip->close(); $GITHUB_OUTPUT = (string) $this->configuration->get('GITHUB_OUTPUT'); - if (!empty($GITHUB_OUTPUT)) { + if (empty($GITHUB_OUTPUT)) { $name = 'directory_path'; $value = (string) $this->configuration->get('build.directory'); file_put_contents($GITHUB_OUTPUT, "{$name}={$value}\n", FILE_APPEND);

Artifacts

Produced during runtime
Name Size
rosven9856~composer-package-action~8755W1.dockerbuild Expired
44.9 KB