From 8c0d2da58abc4b140600f4aa9c22b6a8291b7b1c Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Wed, 21 Feb 2024 15:50:33 -0800 Subject: [PATCH] kill mutant --- tests/phpunit/src/CommandTestBase.php | 11 +++++++++-- .../CodeStudio/CodeStudioWizardCommandTest.php | 7 +++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/src/CommandTestBase.php b/tests/phpunit/src/CommandTestBase.php index 5fb2eebde..1a86adc6e 100644 --- a/tests/phpunit/src/CommandTestBase.php +++ b/tests/phpunit/src/CommandTestBase.php @@ -648,7 +648,7 @@ protected function getMockGitLabVariables(): array { 'key' => 'ACQUIA_APPLICATION_UUID', 'masked' => TRUE, 'protected' => FALSE, - 'value' => '2b3f7cf0-6602-4590-948b-3b07b1b005ef', + 'value' => 'a47ac10b-58cc-4372-a567-0e02b2c3d470', 'variable_type' => 'env_var', ], 1 => [ @@ -656,7 +656,14 @@ protected function getMockGitLabVariables(): array { 'key' => 'ACQUIA_CLOUD_API_TOKEN_KEY', 'masked' => TRUE, 'protected' => FALSE, - 'value' => '111aae74-e81a-4052-b4b9-a27a62e6b6a6', + 'value' => '17feaf34-5d04-402b-9a67-15d5161d24e1', + 'variable_type' => 'env_var', + ], + 2 => [ + 'key' => 'ACQUIA_CLOUD_API_TOKEN_SECRET', + 'masked' => TRUE, + 'protected' => FALSE, + 'value' => 'X1u\/PIQXtYaoeui.4RJSJpGZjwmWYmfl5AUQkAebYE=', 'variable_type' => 'env_var', ], ]; diff --git a/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php b/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php index 3b8480a65..5a2b4379f 100644 --- a/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php +++ b/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php @@ -463,9 +463,12 @@ protected function mockGitLabNamespaces(ObjectProphecy $gitlabClient): void { } protected function mockGitLabVariables(int $gitlabProjectId, ObjectProphecy $projects): void { - $projects->variables($gitlabProjectId)->willReturn($this->getMockGitLabVariables()); + $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(); - $projects->updateVariable($this->gitLabProjectId, Argument::type('string'), Argument::type('string'), FALSE, NULL, ["masked" => TRUE, "variable_type" => "env_var"])->shouldBeCalled(); + foreach ($variables as $variable) { + $projects->updateVariable($this->gitLabProjectId, $variable['key'], $variable['value'], FALSE, NULL, ['masked' => TRUE, 'variable_type' => 'env_var'])->shouldBeCalled(); + } } }