From 572a54d3eda7d6fcbe5226ce4bd00cab73b5bf82 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 14 Nov 2024 14:03:06 -0800 Subject: [PATCH] fix tests --- .../src/Commands/Acsf/AcsfAuthLoginCommandTest.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/src/Commands/Acsf/AcsfAuthLoginCommandTest.php b/tests/phpunit/src/Commands/Acsf/AcsfAuthLoginCommandTest.php index 616b5f0bd..c2d763cb3 100644 --- a/tests/phpunit/src/Commands/Acsf/AcsfAuthLoginCommandTest.php +++ b/tests/phpunit/src/Commands/Acsf/AcsfAuthLoginCommandTest.php @@ -159,7 +159,18 @@ public function testAcsfAuthLoginInvalidInput(): void $this->createDataStores(); $this->command = $this->createCommand(); $this->expectException(MissingInputException::class); - $this->executeCommand([], ['n', 'Enter a new factory URL', 'example.com']); + $this->executeCommand([], ['Enter a new factory URL', 'example.com']); + } + + public function testAcsfAuthLoginValidInput(): void + { + $this->removeMockCloudConfigFile(); + $this->createMockCloudConfigFile(AcsfCommandTestBase::getAcsfCredentialsFileContents()); + $this->createDataStores(); + $this->command = $this->createCommand(); + $this->executeCommand([], ['Enter a new factory URL', 'https://example.com', 'Enter a new user', 'asdfasdf', 'asdfasdfasdf']); + $output = $this->getDisplay(); + $this->assertStringContainsString('Enter your Site Factory URL (including https://) (option -f, --factory-url):', $output); } protected function assertKeySavedCorrectly(): void