diff --git a/tests/phpunit/src/Commands/DocsCommandTest.php b/tests/phpunit/src/Commands/DocsCommandTest.php new file mode 100644 index 000000000..cb7f3e1cc --- /dev/null +++ b/tests/phpunit/src/Commands/DocsCommandTest.php @@ -0,0 +1,114 @@ +injectCommand(DocsCommand::class); + } + + /** + * @dataProvider providerTestDocsCommand + */ + public function testDocsCommand(int $input, string $expectedOutput): void { + $localMachineHelper = $this->mockLocalMachineHelper(); + $localMachineHelper->startBrowser(Argument::any())->shouldBeCalled(); + + $this->executeCommand([], [$input]); + $output = $this->getDisplay(); + $this->assertStringContainsString('Select the Acquia Product [Acquia CLI]:', $output); + $this->assertStringContainsString($expectedOutput, $output); + } + + /** + * @return array + */ + public function providerTestDocsCommand(): array { + return [ + [ + 0, + '[0 ] Acquia CLI', + ], + [ + 1, + '[1 ] Acquia CMS', + ], + [ + 2, + '[2 ] Acquia DAM Classic', + ], + [ + 3, + '[3 ] Acquia Migrate Accelerate', + ], + [ + 4, + '[4 ] BLT', + ], + [ + 5, + '[5 ] Campaign Factory', + ], + [ + 6, + '[6 ] Campaign Studio', + ], + [ + 7, + '[7 ] Cloud IDE', + ], + [ + 8, + '[8 ] Cloud Platform', + ], + [ + 9, + '[9 ] Code Studio', + ], + [ + 10, + '[10] Content Hub', + ], + [ + 11, + '[11] Customer Data Platform', + ], + [ + 12, + '[12] Edge', + ], + [ + 13, + '[13] Personalization', + ], + [ + 14, + '[14] Search', + ], + [ + 15, + '[15] Shield', + ], + [ + 16, + '[16] Site Factory', + ], + [ + 17, + '[17] Site Studio', + ], + ]; + } + +}