Skip to content

Commit

Permalink
GL-2039: Updated test file to resolve error in test checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
akashkska committed Feb 14, 2024
1 parent 5b50c28 commit 6141704
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Command/CodeStudio/CodeStudioWizardCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
// But, we specifically need an API Token key-pair of Code Studio.
// So we reauthenticate to be sure we're using the provided credentials.
$this->reAuthenticate($cloudKey, $cloudSecret, $this->cloudCredentials->getBaseUri(), $this->cloudCredentials->getAccountsUri());

$phpVersion = NULL;
$nodeVersion = NULL;
$projectType = [

Check warning on line 47 in src/Command/CodeStudio/CodeStudioWizardCommand.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ $this->reAuthenticate($cloudKey, $cloudSecret, $this->cloudCredentials->getBaseUri(), $this->cloudCredentials->getAccountsUri()); $phpVersion = NULL; $nodeVersion = NULL; - $projectType = ['Drupal_project', 'Node_project']; + $projectType = ['Node_project']; $projectSelected = $this->io->choice('Select a project type', $projectType, $projectType[0]); echo "Selected project is, {$projectSelected}"; if ($projectSelected == 'Drupal_project') {
'Drupal_project',
'Node_project',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function testCommand(mixed $mockedGitlabProjects, mixed $inputs, mixed $a
$this->mockRequest('getAccount');
$this->mockGitLabPermissionsRequest($this::$applicationUuid);
$projects = $this->mockGetGitLabProjects($this::$applicationUuid, $this->gitLabProjectId, $mockedGitlabProjects);
$projects->variables($this->gitLabProjectId)->willReturn(CodeStudioCiCdVariables::getDefaults());
$projects->variables($this->gitLabProjectId)->willReturn(CodeStudioCiCdVariables::getDefaultsForPhp());
$projects->update($this->gitLabProjectId, Argument::type('array'));
$gitlabClient->projects()->willReturn($projects);
$localMachineHelper->getFilesystem()->willReturn(new Filesystem())->shouldBeCalled();
Expand Down

0 comments on commit 6141704

Please sign in to comment.