You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to write tests around running a command that prompts for input which has a defaulted value, if I run the following commands pest/phpunit fails to process and does not give any output with regards to any tests that were ran.
test('Project init defaults the slug to the project url', function() {
$this->artisan('project:init')
->expectsQuestion('If known, enter the url for the project', 'test.com')
->expectsQuestion('Enter the slug you want to use for this project', '') // simulate the user not entering a value
->expectsTable(
['Argument', 'Value'],
[
['url', 'test.com'],
['slug', 'testcom'],
]
)->assertExitCode(0);
});
I was able to locate the issue in the Laravel Framework repo but I am not sure if submitting a pull request to the main Laravel Framework is the right approach or if it is possible that there is a bug somewhere else in the stack. Here is the fix that I created.
The text was updated successfully, but these errors were encountered:
likeadeckofcards
changed the title
Providing Default value when asking a question hangs up pest
Providing Default value when asking a question hangs up pest/phpunit
Dec 3, 2021
likeadeckofcards
changed the title
Providing Default value when asking a question hangs up pest/phpunit
Providing no value when asking a question hangs up pest/phpunit
Dec 3, 2021
While trying to write tests around running a command that prompts for input which has a defaulted value, if I run the following commands pest/phpunit fails to process and does not give any output with regards to any tests that were ran.
I was able to locate the issue in the Laravel Framework repo but I am not sure if submitting a pull request to the main Laravel Framework is the right approach or if it is possible that there is a bug somewhere else in the stack. Here is the fix that I created.
The text was updated successfully, but these errors were encountered: