Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Nov 14, 2024
1 parent efd491f commit 3551105
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Command/App/LogTailCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function configure(): void

protected function execute(InputInterface $input, OutputInterface $output): int
{
$environment = $this->determineEnvironment($input, $output, true);
$environment = $this->determineEnvironment($input, $output);
$acquiaCloudClient = $this->cloudApiClientService->getClient();
$logs = $this->promptChooseLogs();
$logTypes = array_map(static function (mixed $log) {
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Email/ConfigurePlatformEmailCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private function addDomainToSubscriptionApplications(Client $client, Subscriptio
/**
* Validates the URL entered as the base domain name.
*/
public static function validateUrl(?string $url): string
protected static function validateUrl(?string $url): string
{
$constraintsList = [new NotBlank()];
$urlParts = parse_url($url);
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Remote/DrushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function configure(): void
*/
protected function execute(InputInterface $input, OutputInterface $output): ?int
{
$environment = $this->determineEnvironment($input, $output, true);
$environment = $this->determineEnvironment($input, $output);
$alias = self::getEnvironmentAlias($environment);
$acliArguments = $input->getArguments();
$drushArguments = (array) $acliArguments['drush_command'];
Expand Down
11 changes: 11 additions & 0 deletions tests/phpunit/src/Commands/Acsf/AcsfAuthLoginCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Acquia\Cli\Command\CommandBase;
use Acquia\Cli\Config\CloudDataConfig;
use Acquia\Cli\DataStore\CloudDataStore;
use Symfony\Component\Console\Exception\MissingInputException;
use Symfony\Component\Validator\Exception\ValidatorException;

/**
Expand Down Expand Up @@ -151,6 +152,16 @@ public function testAcsfAuthLoginInvalid(array $args, string $message): void
$this->executeCommand($args);
}

public function testAcsfAuthLoginInvalidInput(): void
{
$this->removeMockCloudConfigFile();
$this->createMockCloudConfigFile(AcsfCommandTestBase::getAcsfCredentialsFileContents());
$this->createDataStores();
$this->command = $this->createCommand();
$this->expectException(MissingInputException::class);
$this->executeCommand([], ['n', 'Enter a new factory URL', 'example.com']);
}

protected function assertKeySavedCorrectly(): void
{
$credsFile = $this->cloudConfigFilepath;
Expand Down

0 comments on commit 3551105

Please sign in to comment.