Skip to content

Commit

Permalink
add help test
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Oct 16, 2024
1 parent 7ac94c4 commit e91ca09
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/phpunit/src/Commands/Pull/PullDatabaseCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ public function testPullDatabases(): void
$this->assertStringContainsString('Downloading backup 1', $output);
}

public function testPullDbHelp(): void
{
$help = $this->command->getHelp();
$this->assertStringContainsString('This command requires authentication via the Cloud Platform API.', $help);
$this->assertStringContainsString('This command requires an active database connection. Set the following environment variables prior to running this command: ACLI_DB_HOST, ACLI_DB_NAME, ACLI_DB_USER, ACLI_DB_PASSWORD', $help);
$this->assertStringContainsString('This command requires the \'View database connection details\' permission.', $help);
}

public function testPullProdDatabase(): void
{
$localMachineHelper = $this->mockLocalMachineHelper();
Expand Down

0 comments on commit e91ca09

Please sign in to comment.