CLI-1296: auth:login on 2.23.1 > Invalid key in Cloud datastore fixed #2173
mutation.yml
on: pull_request
Mutation Testing
7m 16s
Annotations
1 warning
Mutation Testing:
src/Command/Auth/AuthLoginCommand.php#L30
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
$keys = $this->datastoreCloud->get('keys');
$activeKey = $this->datastoreCloud->get('acli_key');
// @todo this validation should really be enforced as a schema on the datastore.
- if (is_array($keys) && !empty($keys) != 0 && !array_key_exists($activeKey, $keys)) {
+ if ((is_array($keys) || !empty($keys) != 0) && !array_key_exists($activeKey, $keys)) {
throw new AcquiaCliException('Invalid key in Cloud datastore; run acli auth:logout && acli auth:login to fix');
}
if ($activeKey) {
|