Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Mar 29, 2024
1 parent 463a0f0 commit cf3445a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/phpunit/src/Commands/Auth/AuthLoginCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function testAuthLoginInvalidDatastore(): void {
$this->createDataStores();
$this->command = $this->createCommand();
$this->expectException(AcquiaCliException::class);
$this->expectExceptionMessage('Invalid key in Cloud datastore; run acli auth:logout && acli auth:login to fix');
$this->expectExceptionMessage("Invalid key in datastore at $this->cloudConfigFilepath");
$this->executeCommand();
}

Expand Down
5 changes: 5 additions & 0 deletions tests/phpunit/src/Misc/ExceptionListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function testHelp(Throwable $error, string|array $helpText): void {
else {
$messages = array_merge([$helpText], $messages1);
}
$messages[0] = "<options=bold>How to fix it:</> $messages[0]";
$applicationProphecy->setHelpMessages($messages)->shouldBeCalled();
$commandProphecy->getApplication()->willReturn($applicationProphecy->reveal());
$consoleErrorEvent = new ConsoleErrorEvent($this->input, $this->output, $error, $commandProphecy->reveal());
Expand Down Expand Up @@ -90,6 +91,10 @@ public function providerTestHelp(): array {
new AcquiaCliException('This machine is not yet authenticated with Site Factory.'),
'Run `acli auth:acsf-login` to re-authenticate with Site Factory.',
],
[
new AcquiaCliException('Invalid key in datastore at {filepath}'),
'Delete the datastore and run this command again.',
],
[
new ApiErrorException((object) ['error' => '', 'message' => "There are no available Cloud IDEs for this application.\n"]),
'Delete an existing IDE via <bg=blue;fg=white;options=bold>acli ide:delete</> or contact your Account Manager or Acquia Sales to purchase additional IDEs.',
Expand Down

0 comments on commit cf3445a

Please sign in to comment.