Skip to content

Commit 5cd1bec

Browse files
committed
Add missing composer dependencies & fix test
1 parent 0cfb9ed commit 5cd1bec

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@
2525
}
2626
},
2727
"require": {
28+
"php": "^7.2|^8.0",
2829
"ext-json": "*",
2930
"laravel/framework": "^5.4|^6.0|^7.0|^8.0"
3031
},
3132
"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"
3336
},
3437
"extra": {
3538
"laravel": {

tests/ResponseTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,13 @@ public function test_lazy_resource_response()
134134

135135
$this->assertInstanceOf(JsonResponse::class, $response);
136136
$this->assertSame('User/Index', $page->component);
137-
$this->assertSame(json_encode($expected), json_encode($page->props->users));
138137
$this->assertSame('/users?page=1', $page->url);
139138
$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+
});
140144
}
141145

142146
public function test_arrayable_prop_response()

0 commit comments

Comments
 (0)