File tree Expand file tree Collapse file tree 2 files changed +28
-4
lines changed Expand file tree Collapse file tree 2 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 3
3
All notable changes to this project will be documented in this file. This project adheres to
4
4
[ Semantic Versioning] ( http://semver.org/ ) and [ this changelog format] ( http://keepachangelog.com/ ) .
5
5
6
+ ## [ 1.1.1] - 2022-02-27
7
+
8
+ ### Fixed
9
+
10
+ - The Symfony response class can return ` false ` for the response content. This caused a fatal error when the content was
11
+ passed to JSON: API assertions - as the assertion methods type-hint the content as a ` string ` in version 4 of that
12
+ dependency. This has been fixed by adding a ` TestResponse::getContent() ` method that returns an empty string if the
13
+ Symfony method returns ` false ` .
14
+
6
15
## [ 1.1.0] - 2022-02-08
7
16
8
17
### Added
@@ -17,9 +26,9 @@ All notable changes to this project will be documented in this file. This projec
17
26
18
27
- The following page assertions will be removed in the next major release. You should use the fluent methods instead to
19
28
assert the resources fetched, meta and links. Deprecated methods are:
20
- - ` assertFetchedPage() ` - use ` assertFetchedMany() ` , ` assertMeta() ` and ` assertLinks() ` .
21
- - ` assertFetchedPageInOrder() ` - use ` assertFetchedManyInOrder() ` , ` assertMeta() ` and ` assertLinks() ` .
22
- - ` assertFetchedEmptyPage() ` - use ` assertFetchedNone() ` , ` assertMeta() ` and ` assertLinks() ` .
29
+ - ` assertFetchedPage() ` - use ` assertFetchedMany() ` , ` assertMeta() ` and ` assertLinks() ` .
30
+ - ` assertFetchedPageInOrder() ` - use ` assertFetchedManyInOrder() ` , ` assertMeta() ` and ` assertLinks() ` .
31
+ - ` assertFetchedEmptyPage() ` - use ` assertFetchedNone() ` , ` assertMeta() ` and ` assertLinks() ` .
23
32
24
33
## [ 1.0.0] - 2021-07-31
25
34
Original file line number Diff line number Diff line change 24
24
25
25
class TestResponse extends BaseTestResponse
26
26
{
27
-
28
27
use HasHttpAssertions;
29
28
30
29
/**
@@ -79,6 +78,22 @@ public function getId(): ?string
79
78
return $ this ->jsonApi ('/data/id ' );
80
79
}
81
80
81
+ /**
82
+ * Get the response content.
83
+ *
84
+ * @return string
85
+ */
86
+ public function getContent (): string
87
+ {
88
+ $ content = $ this ->baseResponse ->getContent ();
89
+
90
+ if (false === $ content ) {
91
+ return '' ;
92
+ }
93
+
94
+ return $ content ;
95
+ }
96
+
82
97
/**
83
98
* @return string|null
84
99
*/
You can’t perform that action at this time.
0 commit comments