From 17d55889b0a5da64d0d60c71bfaafff590e234f5 Mon Sep 17 00:00:00 2001 From: Matt Glaman Date: Thu, 5 Sep 2024 13:36:25 -0500 Subject: [PATCH] fix phpcs and remove ignored mocks --- src/Command/Push/PushArtifactCommand.php | 4 ++-- tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Command/Push/PushArtifactCommand.php b/src/Command/Push/PushArtifactCommand.php index 77e6302e9..90e6b0af6 100644 --- a/src/Command/Push/PushArtifactCommand.php +++ b/src/Command/Push/PushArtifactCommand.php @@ -160,11 +160,11 @@ private function determineDestinationGitUrls(): array if ($envVar = getenv('ACLI_PUSH_ARTIFACT_DESTINATION_GIT_URLS')) { return explode(',', $envVar); } - + if ($this->datastoreAcli->get('push.artifact.destination-git-urls')) { return $this->datastoreAcli->get('push.artifact.destination-git-urls'); } - + $applicationUuid = $this->determineCloudApplication(); return [$this->getAnyVcsUrl($applicationUuid)]; } diff --git a/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php b/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php index 1b5bf8aa9..2ee5c2342 100644 --- a/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php +++ b/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php @@ -122,9 +122,6 @@ public function testPushTagArtifact(): void public function testPushArtifactWithAcquiaCliFile(): void { - $applications = $this->mockRequest('getApplications'); - $this->mockRequest('getApplicationByUuid', $applications[0]->uuid); - $this->mockRequest('getApplicationEnvironments', $applications[0]->uuid); $this->datastoreAcli->set('push.artifact.destination-git-urls', [ 'https://github.com/example1/cli.git', 'https://github.com/example2/cli.git',