Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed May 16, 2024
1 parent 8624d72 commit 9849ab8
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions tests/phpunit/src/Commands/CommandBaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

use Acquia\Cli\Command\App\LinkCommand;
use Acquia\Cli\Command\CommandBase;
use Acquia\Cli\Command\Ide\IdeListCommand;
use Acquia\Cli\Exception\AcquiaCliException;
use Acquia\Cli\Tests\CommandTestBase;

/**
Expand All @@ -20,8 +22,26 @@ protected function createCommand(): CommandBase {
return $this->injectCommand(LinkCommand::class);
}

public function testNothing(): void {
$this->assertTrue(TRUE);
public function testUnauthenticatedFailure(): void {
$this->clientServiceProphecy->isMachineAuthenticated()->willReturn(FALSE);
$this->removeMockConfigFiles();

$inputs = [
// Would you like to share anonymous performance usage and data?
'n',
];
$this->expectException(AcquiaCliException::class);
$this->expectExceptionMessage('This machine is not yet authenticated with the Cloud Platform.');
$this->executeCommand([], $inputs);
}

public function testCloudAppFromLocalConfig(): void {
$this->command = $this->injectCommand(IdeListCommand::class);
$this->mockRequest('getApplicationByUuid', 'a47ac10b-58cc-4372-a567-0e02b2c3d470');
$this->mockRequest('getApplicationIdes', 'a47ac10b-58cc-4372-a567-0e02b2c3d470');
$this->createMockAcliConfigFile('a47ac10b-58cc-4372-a567-0e02b2c3d470');
$this->executeCommand();

}

}

0 comments on commit 9849ab8

Please sign in to comment.