diff --git a/src/Command/CodeStudio/CodeStudioCiCdVariables.php b/src/Command/CodeStudio/CodeStudioCiCdVariables.php index f2c18d9e6..de7691aac 100644 --- a/src/Command/CodeStudio/CodeStudioCiCdVariables.php +++ b/src/Command/CodeStudio/CodeStudioCiCdVariables.php @@ -56,7 +56,7 @@ public static function getDefaultsForNode(?string $cloudApplicationUuid = NULL, ], [ 'key' => 'NODE_VERSION', - 'masked' => TRUE, + 'masked' => FALSE, 'protected' => FALSE, 'value' => $nodeVersion, 'variable_type' => 'env_var', @@ -106,7 +106,7 @@ public static function getDefaultsForPhp(?string $cloudApplicationUuid = NULL, ? ], [ 'key' => 'PHP_VERSION', - 'masked' => TRUE, + 'masked' => FALSE, 'protected' => FALSE, 'value' => $phpVersion, 'variable_type' => 'env_var', diff --git a/tests/phpunit/src/CommandTestBase.php b/tests/phpunit/src/CommandTestBase.php index 1a86adc6e..6a9c09b8c 100644 --- a/tests/phpunit/src/CommandTestBase.php +++ b/tests/phpunit/src/CommandTestBase.php @@ -661,7 +661,7 @@ protected function getMockGitLabVariables(): array { ], 2 => [ 'key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', - 'masked' => TRUE, + 'masked' => FALSE, 'protected' => FALSE, 'value' => 'X1u\/PIQXtYaoeui.4RJSJpGZjwmWYmfl5AUQkAebYE=', 'variable_type' => 'env_var', diff --git a/tests/phpunit/src/Commands/CodeStudio/CodeStudioCiCdVariablesTest.php b/tests/phpunit/src/Commands/CodeStudio/CodeStudioCiCdVariablesTest.php index 197eec768..b18f7d2fb 100644 --- a/tests/phpunit/src/Commands/CodeStudio/CodeStudioCiCdVariablesTest.php +++ b/tests/phpunit/src/Commands/CodeStudio/CodeStudioCiCdVariablesTest.php @@ -18,9 +18,15 @@ public function testGetDefaultsForNode(): void { } protected function testBooleanValues(array $variables): void { - foreach ($variables as $variable) { - $maskedValue = $variable['masked']; - $this->assertEquals(TRUE, $maskedValue); + foreach ($variables as $variable ) { + if ($variable['key'] !== "PHP_VERSION" && $variable['key'] !== "NODE_VERSION") { + $maskedValue = $variable['masked']; + $this->assertEquals(TRUE, $maskedValue); + } + else { + $maskedValue = $variable['masked']; + $this->assertEquals(FALSE, $maskedValue); + } $protectedValue = $variable['protected']; $this->assertEquals(FALSE, $protectedValue); } diff --git a/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php b/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php index 9a979fad9..994d1fb7a 100644 --- a/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php +++ b/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php @@ -517,9 +517,8 @@ protected function mockGitLabVariables(int $gitlabProjectId, ObjectProphecy $pro $variables = $this->getMockGitLabVariables(); $projects->variables($gitlabProjectId)->willReturn($variables); foreach ($variables as $variable) { - $projects->addVariable($this->gitLabProjectId, Argument::type('string'), Argument::type('string'), FALSE, NULL, ['masked' => $variable['masked'], 'variable_type' => $variable['variable_type']])->shouldBeCalled(); + $projects->addVariable($gitlabProjectId, Argument::type('string'), Argument::type('string'), Argument::type('bool'), NULL, ['masked' => $variable['masked'], 'variable_type' => $variable['variable_type']])->shouldBeCalled(); } - // $projects->addVariable($gitlabProjectId, Argument::type('string'), Argument::type('string'), Argument::type('bool'), NULL, Argument::type('array'))->shouldBeCalled(); foreach ($variables as $variable) { $projects->updateVariable($this->gitLabProjectId, $variable['key'], $variable['value'], FALSE, NULL, ['masked' => TRUE, 'variable_type' => 'env_var'])->shouldBeCalled(); }