Skip to content

Commit

Permalink
Add missing composer dependencies & fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodekker committed Mar 2, 2021
1 parent 0cfb9ed commit 5cd1bec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@
}
},
"require": {
"php": "^7.2|^8.0",
"ext-json": "*",
"laravel/framework": "^5.4|^6.0|^7.0|^8.0"
},
"require-dev": {
"orchestra/testbench": "~3.0"
"roave/security-advisories": "dev-master",
"orchestra/testbench": "^4.0|^5.0|^6.0",
"phpunit/phpunit": "^8.0|^9.0"
},
"extra": {
"laravel": {
Expand Down
6 changes: 5 additions & 1 deletion tests/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,13 @@ public function test_lazy_resource_response()

$this->assertInstanceOf(JsonResponse::class, $response);
$this->assertSame('User/Index', $page->component);
$this->assertSame(json_encode($expected), json_encode($page->props->users));
$this->assertSame('/users?page=1', $page->url);
$this->assertSame('123', $page->version);
tap($page->props->users, function ($users) use ($expected) {
$this->assertSame(json_encode($expected['data']), json_encode($users->data));
$this->assertSame(json_encode($expected['links']), json_encode($users->links));
$this->assertSame('/', $users->meta->path);
});
}

public function test_arrayable_prop_response()
Expand Down

0 comments on commit 5cd1bec

Please sign in to comment.