GL-2039: Added prompt for nodejs and php project selection. #2098
mutation.yml
on: pull_request
Mutation Testing
6m 31s
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]);
switch ($projectSelected) {
case "Drupal_project":
|
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]);
switch ($projectSelected) {
case "Drupal_project":
$phpVersions = ['PHP_version_8.1' => "8.1", 'PHP_version_8.2' => "8.2"];
|
Mutation Testing:
src/Command/CodeStudio/CodeStudioWizardCommand.php#L64
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
$phpVersion = $phpVersions[$project];
break;
case "Node_project":
- $nodeVersions = ['NODE_version_18.17.1' => "18.17.1", 'NODE_version_20.5.1' => "20.5.1"];
+ $nodeVersions = ['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);
$nodeVersion = $nodeVersions[$project];
|
Mutation Testing:
src/Command/CodeStudio/CodeStudioWizardCommand.php#L123
Escaped Mutant for Mutator "AssignmentEqual":
--- Original
+++ New
@@ @@
$this->updateGitLabProject($project);
if ($projectSelected == 'Drupal_project') {
$this->setGitLabCiCdVariablesForPhpProject($project, $appUuid, $cloudKey, $cloudSecret, $projectAccessTokenName, $projectAccessToken, $phpVersion);
- } elseif ($projectSelected == 'Node_project') {
+ } elseif ($projectSelected = 'Node_project') {
$this->setGitLabCiCdVariablesForNodeProject($project, $appUuid, $cloudKey, $cloudSecret, $projectAccessTokenName, $projectAccessToken, $nodeVersion);
}
$this->createScheduledPipeline($project);
|