Skip to content

Commit

Permalink
Merge pull request #4 from akashkska/GL-2039-2
Browse files Browse the repository at this point in the history
GL-2039: modified testcase.
  • Loading branch information
akashkska authored Mar 4, 2024
2 parents 885b197 + 529da4e commit ecac0b7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit ecac0b7

Please sign in to comment.