Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Add doesntExpectOutputToContain assertion method #42096

Merged
merged 2 commits into from
Apr 22, 2022
Merged

[9.x] Add doesntExpectOutputToContain assertion method #42096

merged 2 commits into from
Apr 22, 2022

Conversation

hebinet
Copy link
Contributor

@hebinet hebinet commented Apr 22, 2022

This PR adds the new Command assertion method doesntExpectOutputToContain

Usage

Artisan::command('contains', function () {
    $this->line('My name is Taylor Otwell');
});

$this->artisan('contains')
    ->doesntExpectOutputToContain('Taylor Otwell')

Why do I think this is usefull?
Lately I had to check for a String which wasn't included in the Output of a Command and I was suprised that there are the methods expectsOutput, doesntExpectOutput and expectsOutputToContain but no doesntExpectOutputToContain.

So here it is 😄

@taylorotwell taylorotwell merged commit bce3cf8 into laravel:9.x Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants