File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 25
25
}
26
26
},
27
27
"require" : {
28
+ "php" : " ^7.2|^8.0" ,
28
29
"ext-json" : " *" ,
29
30
"laravel/framework" : " ^5.4|^6.0|^7.0|^8.0"
30
31
},
31
32
"require-dev" : {
32
- "orchestra/testbench" : " ~3.0"
33
+ "roave/security-advisories" : " dev-master" ,
34
+ "orchestra/testbench" : " ^4.0|^5.0|^6.0" ,
35
+ "phpunit/phpunit" : " ^8.0|^9.0"
33
36
},
34
37
"extra" : {
35
38
"laravel" : {
Original file line number Diff line number Diff line change @@ -134,9 +134,13 @@ public function test_lazy_resource_response()
134
134
135
135
$ this ->assertInstanceOf (JsonResponse::class, $ response );
136
136
$ this ->assertSame ('User/Index ' , $ page ->component );
137
- $ this ->assertSame (json_encode ($ expected ), json_encode ($ page ->props ->users ));
138
137
$ this ->assertSame ('/users?page=1 ' , $ page ->url );
139
138
$ this ->assertSame ('123 ' , $ page ->version );
139
+ tap ($ page ->props ->users , function ($ users ) use ($ expected ) {
140
+ $ this ->assertSame (json_encode ($ expected ['data ' ]), json_encode ($ users ->data ));
141
+ $ this ->assertSame (json_encode ($ expected ['links ' ]), json_encode ($ users ->links ));
142
+ $ this ->assertSame ('/ ' , $ users ->meta ->path );
143
+ });
140
144
}
141
145
142
146
public function test_arrayable_prop_response ()
You can’t perform that action at this time.
0 commit comments