Skip to content

CLI-1292: Catch Cloud API type errors #2151

CLI-1292: Catch Cloud API type errors

CLI-1292: Catch Cloud API type errors #2151

Triggered via pull request March 13, 2024 20:36
Status Success
Total duration 3m 42s
Artifacts

mutation.yml

on: pull_request
Mutation Testing
3m 34s
Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

6 warnings
Mutation Testing: src/EventListener/ExceptionListener.php#L82
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ $this->helpMessages[] = "You can learn more about Cloud Platform API at https://docs.acquia.com/cloud-platform/develop/api/"; } } - if ($error instanceof \TypeError && str_contains($error->getMessage(), 'AcquiaCloudApi\\Response')) { + if (false && str_contains($error->getMessage(), 'AcquiaCloudApi\\Response')) { $newErrorMessage = 'Cloud API returned an unexpected data type; this could indicate a problem with your Cloud application.'; } $this->helpMessages[] = "You can find Acquia CLI documentation at https://docs.acquia.com/acquia-cli/";
Mutation Testing: src/EventListener/ExceptionListener.php#L82
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ $this->helpMessages[] = "You can learn more about Cloud Platform API at https://docs.acquia.com/cloud-platform/develop/api/"; } } - if ($error instanceof \TypeError && str_contains($error->getMessage(), 'AcquiaCloudApi\\Response')) { + if (true && str_contains($error->getMessage(), 'AcquiaCloudApi\\Response')) { $newErrorMessage = 'Cloud API returned an unexpected data type; this could indicate a problem with your Cloud application.'; } $this->helpMessages[] = "You can find Acquia CLI documentation at https://docs.acquia.com/acquia-cli/";
Mutation Testing: src/EventListener/ExceptionListener.php#L82
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ $this->helpMessages[] = "You can learn more about Cloud Platform API at https://docs.acquia.com/cloud-platform/develop/api/"; } } - if ($error instanceof \TypeError && str_contains($error->getMessage(), 'AcquiaCloudApi\\Response')) { + if ($error instanceof \TypeError || str_contains($error->getMessage(), 'AcquiaCloudApi\\Response')) { $newErrorMessage = 'Cloud API returned an unexpected data type; this could indicate a problem with your Cloud application.'; } $this->helpMessages[] = "You can find Acquia CLI documentation at https://docs.acquia.com/acquia-cli/";
Mutation Testing: src/EventListener/ExceptionListener.php#L82
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": --- Original +++ New @@ @@ $this->helpMessages[] = "You can learn more about Cloud Platform API at https://docs.acquia.com/cloud-platform/develop/api/"; } } - if ($error instanceof \TypeError && str_contains($error->getMessage(), 'AcquiaCloudApi\\Response')) { + if (!$error instanceof \TypeError && !str_contains($error->getMessage(), 'AcquiaCloudApi\\Response')) { $newErrorMessage = 'Cloud API returned an unexpected data type; this could indicate a problem with your Cloud application.'; } $this->helpMessages[] = "You can find Acquia CLI documentation at https://docs.acquia.com/acquia-cli/";
Mutation Testing: src/EventListener/ExceptionListener.php#L82
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation": --- Original +++ New @@ @@ $this->helpMessages[] = "You can learn more about Cloud Platform API at https://docs.acquia.com/cloud-platform/develop/api/"; } } - if ($error instanceof \TypeError && str_contains($error->getMessage(), 'AcquiaCloudApi\\Response')) { + if ($error instanceof \TypeError && !str_contains($error->getMessage(), 'AcquiaCloudApi\\Response')) { $newErrorMessage = 'Cloud API returned an unexpected data type; this could indicate a problem with your Cloud application.'; } $this->helpMessages[] = "You can find Acquia CLI documentation at https://docs.acquia.com/acquia-cli/";
Mutation Testing: src/EventListener/ExceptionListener.php#L82
Escaped Mutant for Mutator "LogicalAndNegation": --- Original +++ New @@ @@ $this->helpMessages[] = "You can learn more about Cloud Platform API at https://docs.acquia.com/cloud-platform/develop/api/"; } } - if ($error instanceof \TypeError && str_contains($error->getMessage(), 'AcquiaCloudApi\\Response')) { + if (!($error instanceof \TypeError && str_contains($error->getMessage(), 'AcquiaCloudApi\\Response'))) { $newErrorMessage = 'Cloud API returned an unexpected data type; this could indicate a problem with your Cloud application.'; } $this->helpMessages[] = "You can find Acquia CLI documentation at https://docs.acquia.com/acquia-cli/";