Skip to content

Commit

Permalink
deprecate(testing): ResponseAssertions::assertThatResponse(), pleas…
Browse files Browse the repository at this point in the history
…e use `ResponseAssertions::assertPsrResponse()` instead.
  • Loading branch information
LastDragon-ru committed Mar 14, 2024
1 parent 6d42dda commit 81125e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Asserts that Scout Query equals Scout Query.

[Read more](<docs/Assertions/AssertScoutQueryEquals.md>).

## `assertThatResponse`
## `assertThatResponse` 💀

Asserts that PSR Response satisfies given constraint (we have a lot of built-in [constraints](../../src/Constraints/Response) and [responses](../../src/Responses), but, of course, you can create a custom).

Expand Down
6 changes: 5 additions & 1 deletion packages/testing/docs/Assertions/AssertThatResponse.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# `assertThatResponse`
# `assertThatResponse` 💀

Asserts that PSR Response satisfies given constraint (we have a lot of built-in [constraints](../../src/Constraints/Response) and [responses](../../src/Responses), but, of course, you can create a custom).

> [!WARNING]
>
> Assertion is deprecated, please use [`assertPsrResponse()`](./AssertPsrResponse.md) instead.
[include:example]: ./AssertThatResponseTest.php
[//]: # (start: fef995e7dea4e96b1398204ed11e6026d59490486273866194ec75545254c806)
[//]: # (warning: Generated automatically. Do not edit.)
Expand Down
2 changes: 2 additions & 0 deletions packages/testing/src/Assertions/ResponseAssertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
trait ResponseAssertions {
/**
* Asserts that PSR Response satisfies given constraint.
*
* @deprecated 6.0.0 Please use {@see static::assertPsrResponse()}
*/
public static function assertThatResponse(
ResponseInterface $response,
Expand Down

0 comments on commit 81125e9

Please sign in to comment.