Skip to content

Commit

Permalink
GL-2039: modified testcase.
Browse files Browse the repository at this point in the history
  • Loading branch information
akashkska committed Mar 4, 2024
1 parent d4c44fb commit 529da4e
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 529da4e

Please sign in to comment.