From 529da4eaf5343961cf3eac1d56d6b7b1f8be6f69 Mon Sep 17 00:00:00 2001 From: Akash Karangale Date: Mon, 4 Mar 2024 18:23:27 +0530 Subject: [PATCH] GL-2039: modified testcase. --- .../src/Commands/CodeStudio/CodeStudioWizardCommandTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php b/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php index c519ce54f..ee709894a 100644 --- a/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php +++ b/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php @@ -517,7 +517,10 @@ protected function mockGitLabNamespaces(ObjectProphecy $gitlabClient): void { protected function mockGitLabVariables(int $gitlabProjectId, ObjectProphecy $projects): void { $variables = $this->getMockGitLabVariables(); $projects->variables($gitlabProjectId)->willReturn($variables); - $projects->addVariable($gitlabProjectId, Argument::type('string'), Argument::type('string'), Argument::type('bool'), NULL, Argument::type('array'))->shouldBeCalled(); + 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, 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(); }