CLI-1292: Catch Cloud API type errors #2151
mutation.yml
on: pull_request
Mutation Testing
3m 34s
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/";
|