Created
August 7, 2023 15:51
-
-
Save DominikStyp/17e47af8f9fc3296fa8350dd4b262804 to your computer and use it in GitHub Desktop.
Laravel 10 + PHPUnit: Call artisan command with options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CallArtisanWithOptions { | |
public function test_migrate_documents(): void | |
{ | |
$this->artisan('app:migrate-ftp-documents-to-local-storage') | |
->expectsChoice( | |
'Are you sure you want to migrate all documents from FTP to local storage?', | |
'yes', | |
['yes', 'no'] | |
)->expectsChoice( | |
'Files from which environment you want to migrate?', | |
'local', | |
['local', 'testing', 'acceptance', 'production'] | |
)->assertExitCode(0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment