Skip to content

Conversation

@nunomaduro
Copy link
Member

@nunomaduro nunomaduro commented Sep 1, 2022

While creating tests for Artisan commands, I've noticed that assertSuccessful is just too many characters for me. So, this pull request proposes an assertOk() method that is simply an alias of assertExitCode(0):

it('can run', function () { $this->artisan('inspire')->assertOk(); });

Note that, this combines well with the HTTP layer regarding testing, as we we already have an assertOk() there:

$this->get('/')->assertOk();
@taylorotwell taylorotwell merged commit 3b6c7ad into 9.x Sep 1, 2022
@taylorotwell taylorotwell deleted the feat/artisan-assert-ok branch September 1, 2022 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants