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 TestResponse::assertContent($string) #44580

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

timacdonald
Copy link
Member

@timacdonald timacdonald commented Oct 14, 2022

Papercut: asserting the exact string content of a test response feels out of place with the existing response assertions.

// Response content string should match this exactly. Nothing more. Nothing less.

// before...

$this->assertSame('foo bar', $response->content());

// after...

$response->assertContent('foo bar');

@taylorotwell taylorotwell merged commit c703de3 into laravel:9.x Oct 14, 2022
@timacdonald timacdonald deleted the assert-content branch January 10, 2023 01:23
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.

2 participants