|
| 1 | +<?php |
| 2 | +namespace webfiori\framework\test\cli; |
| 3 | + |
| 4 | +use webfiori\framework\cli\CLITestCase; |
| 5 | +use webfiori\framework\cli\commands\CreateCommand; |
| 6 | +use webfiori\framework\scheduler\webServices\TasksServicesManager; |
| 7 | +use webfiori\http\WebServicesManager; |
| 8 | +/** |
| 9 | + * @author Ibrahim |
| 10 | + */ |
| 11 | +class HelpCommandTest extends CLITestCase { |
| 12 | + /** |
| 13 | + * @test |
| 14 | + */ |
| 15 | + public function test00() { |
| 16 | + $this->assertEquals([ |
| 17 | + "WebFiori Framework (c) Version ". WF_VERSION." ".WF_VERSION_TYPE."\n\n\n", |
| 18 | + "Usage:\n", |
| 19 | + " command [arg1 arg2=\"val\" arg3...]\n\n", |
| 20 | + "Global Arguments:\n", |
| 21 | + " --ansi:[Optional] Force the use of ANSI output.\n", |
| 22 | + "Available Commands:\n", |
| 23 | + " help: Display CLI Help. To display help for specific command, use the argument \"--command-name\" with this command.\n", |
| 24 | + " v: Display framework version info.\n", |
| 25 | + " show-settings: Display application configuration.\n", |
| 26 | + " scheduler: Run tasks scheduler.\n", |
| 27 | + " create: Creates a system entity (middleware, web service, background process ...).\n", |
| 28 | + " add: Add a database connection or SMTP account.\n", |
| 29 | + " list-routes: List all created routes and which resource they point to.\n", |
| 30 | + " list-themes: List all registered themes.\n", |
| 31 | + " run-query: Execute SQL query on specific database.\n", |
| 32 | + " update-settings: Update application settings which are stored in specific configuration driver.\n", |
| 33 | + " update-table: Update a database table.\n", |
| 34 | + ], $this->executeMultiCommand([ |
| 35 | + 'help', |
| 36 | + ])); |
| 37 | + $this->assertEquals(0, $this->getExitCode()); |
| 38 | + } |
| 39 | +} |
0 commit comments