Skip to content

GL-2039: Added prompt for nodejs and php project selection. #2096

GL-2039: Added prompt for nodejs and php project selection.

GL-2039: Added prompt for nodejs and php project selection. #2096

Triggered via pull request February 21, 2024 23:52
Status Success
Total duration 2m 2s
Artifacts

mutation.yml

on: pull_request
Mutation Testing
1m 55s
Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Mutation Testing: src/Command/CodeStudio/CodeStudioCiCdVariables.php#L45
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ */ public static function getDefaultsForNode(?string $cloudApplicationUuid = NULL, ?string $cloudKey = NULL, ?string $cloudSecret = NULL, ?string $projectAccessTokenName = NULL, ?string $projectAccessToken = NULL, ?string $nodeVersion = NULL) : array { - return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => FALSE, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; + return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => false, 'protected' => FALSE, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => FALSE, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; } /** * @return array<mixed>
Mutation Testing: src/Command/CodeStudio/CodeStudioCiCdVariables.php#L46
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public static function getDefaultsForNode(?string $cloudApplicationUuid = NULL, ?string $cloudKey = NULL, ?string $cloudSecret = NULL, ?string $projectAccessTokenName = NULL, ?string $projectAccessToken = NULL, ?string $nodeVersion = NULL) : array { - return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => FALSE, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; + return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => TRUE, 'protected' => true, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => FALSE, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; } /** * @return array<mixed>
Mutation Testing: src/Command/CodeStudio/CodeStudioCiCdVariables.php#L52
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ */ public static function getDefaultsForNode(?string $cloudApplicationUuid = NULL, ?string $cloudKey = NULL, ?string $cloudSecret = NULL, ?string $projectAccessTokenName = NULL, ?string $projectAccessToken = NULL, ?string $nodeVersion = NULL) : array { - return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => FALSE, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; + return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => false, 'protected' => FALSE, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => FALSE, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; } /** * @return array<mixed>
Mutation Testing: src/Command/CodeStudio/CodeStudioCiCdVariables.php#L53
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public static function getDefaultsForNode(?string $cloudApplicationUuid = NULL, ?string $cloudKey = NULL, ?string $cloudSecret = NULL, ?string $projectAccessTokenName = NULL, ?string $projectAccessToken = NULL, ?string $nodeVersion = NULL) : array { - return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => FALSE, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; + return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => TRUE, 'protected' => true, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => FALSE, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; } /** * @return array<mixed>
Mutation Testing: src/Command/CodeStudio/CodeStudioCiCdVariables.php#L59
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public static function getDefaultsForNode(?string $cloudApplicationUuid = NULL, ?string $cloudKey = NULL, ?string $cloudSecret = NULL, ?string $projectAccessTokenName = NULL, ?string $projectAccessToken = NULL, ?string $nodeVersion = NULL) : array { - return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => FALSE, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; + return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => true, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; } /** * @return array<mixed>
Mutation Testing: src/Command/CodeStudio/CodeStudioCiCdVariables.php#L60
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ */ public static function getDefaultsForNode(?string $cloudApplicationUuid = NULL, ?string $cloudKey = NULL, ?string $cloudSecret = NULL, ?string $projectAccessTokenName = NULL, ?string $projectAccessToken = NULL, ?string $nodeVersion = NULL) : array { - return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => FALSE, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; + return [['key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudApplicationUuid, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudKey, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $cloudSecret, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_NAME', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessTokenName, 'variable_type' => 'env_var'], ['key' => 'ACQUIA_GLAB_TOKEN_SECRET', 'masked' => TRUE, 'protected' => FALSE, 'value' => $projectAccessToken, 'variable_type' => 'env_var'], ['key' => 'NODE_VERSION', 'masked' => FALSE, 'protected' => true, 'value' => $nodeVersion, 'variable_type' => 'env_var']]; } /** * @return array<mixed>
Mutation Testing: src/Command/CodeStudio/CodeStudioWizardCommand.php#L47
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ $this->reAuthenticate($cloudKey, $cloudSecret, $this->cloudCredentials->getBaseUri(), $this->cloudCredentials->getAccountsUri()); $phpVersion = NULL; $nodeVersion = NULL; - $projectType = ['Drupal_project', 'Node_project']; + $projectType = ['Node_project']; $projectSelected = $this->io->choice('Select a project type', $projectType, $projectType[0]); if ($projectSelected == 'Drupal_project') { $phpVersions = ['PHP_version_8.1' => "8.1", 'PHP_version_8.2' => "8.2"];
Mutation Testing: src/Command/CodeStudio/CodeStudioWizardCommand.php#L51
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $phpVersion = NULL; $nodeVersion = NULL; $projectType = ['Drupal_project', 'Node_project']; - $projectSelected = $this->io->choice('Select a project type', $projectType, $projectType[0]); + $projectSelected = $this->io->choice('Select a project type', $projectType, $projectType[1]); if ($projectSelected == 'Drupal_project') { $phpVersions = ['PHP_version_8.1' => "8.1", 'PHP_version_8.2' => "8.2"]; $project = $this->io->choice('Select a PHP version', array_values($phpVersions), $phpVersions['PHP_version_8.1']);
Mutation Testing: src/Command/CodeStudio/CodeStudioWizardCommand.php#L53
Escaped Mutant for Mutator "AssignmentEqual": --- Original +++ New @@ @@ $nodeVersion = NULL; $projectType = ['Drupal_project', 'Node_project']; $projectSelected = $this->io->choice('Select a project type', $projectType, $projectType[0]); - if ($projectSelected == 'Drupal_project') { + if ($projectSelected = 'Drupal_project') { $phpVersions = ['PHP_version_8.1' => "8.1", 'PHP_version_8.2' => "8.2"]; $project = $this->io->choice('Select a PHP version', array_values($phpVersions), $phpVersions['PHP_version_8.1']); $project = array_search($project, $phpVersions, TRUE);
Mutation Testing: src/Command/CodeStudio/CodeStudioWizardCommand.php#L62
Escaped Mutant for Mutator "AssignmentEqual": --- Original +++ New @@ @@ $project = $this->io->choice('Select a PHP version', array_values($phpVersions), $phpVersions['PHP_version_8.1']); $project = array_search($project, $phpVersions, TRUE); $phpVersion = $phpVersions[$project]; - } elseif ($projectSelected == 'Node_project') { + } elseif ($projectSelected = 'Node_project') { $nodeVersions = ['NODE_version_18.17.1' => "18.17.1", 'NODE_version_20.5.1' => "20.5.1"]; $project = $this->io->choice('Select a NODE version', array_values($nodeVersions), $nodeVersions['NODE_version_20.5.1']); $project = array_search($project, $nodeVersions, TRUE);