Unable to find JSON:
[{
"data": [
{
"id": "1",
"type": "books",
"attributes": {
"title": "Dr. Freddie Kovacek",
"description": "Ipsam eius harum nam.",
"publication_year": "1982",
"created_at": "2020-06-06T22:23:22.000000Z",
"updated_at": "2020-06-06T22:23:22.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/1/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/1/authors"
},
"data": [
{
"id": "1",
"type": "authors"
},
{
"id": "2",
"type": "authors"
},
{
"id": "3",
"type": "authors"
}
]
}
}
},
{
"id": "2",
"type": "books",
"attributes": {
"title": "Miss Aubree Bernier Sr.",
"description": "Sed nulla tempora amet quod.",
"publication_year": "1987",
"created_at": "2020-06-06T22:23:22.000000Z",
"updated_at": "2020-06-06T22:23:22.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/2/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/2/authors"
}
}
}
},
{
"id": "3",
"type": "books",
"attributes": {
"title": "Herman Bartoletti",
"description": "Id beatae accusantium quam praesentium repellat ipsa maiores ut.",
"publication_year": "1996",
"created_at": "2020-06-06T22:23:22.000000Z",
"updated_at": "2020-06-06T22:23:22.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/3/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/3/authors"
}
}
}
}
],
"included": [
{
"id": "1",
"type": "authors",
"attributes": {
"first_name": "Terrance",
"last_name": "Streich",
"other_name": "Kohler",
"created_at": "2020-06-06T22:23:22.000000Z",
"updated_at": "2020-06-06T22:23:22.000000Z"
}
},
{
"id": "2",
"type": "authors",
"attributes": {
"first_name": "Emmitt",
"last_name": "Walsh",
"other_name": "O'Connell",
"created_at": "2020-06-06T22:23:22.000000Z",
"updated_at": "2020-06-06T22:23:22.000000Z"
}
},
{
"id": "3",
"type": "authors",
"attributes": {
"first_name": "Jeramy",
"last_name": "Luettgen",
"other_name": "Pacocha",
"created_at": "2020-06-06T22:23:22.000000Z",
"updated_at": "2020-06-06T22:23:22.000000Z"
}
}
]
}]
within response JSON:
[{
"data": [
{
"id": "1",
"type": "books",
"attributes": {
"title": "Dr. Freddie Kovacek",
"description": "Ipsam eius harum nam.",
"publication_year": "1982",
"created_at": "2020-06-06T22:23:22.000000Z",
"updated_at": "2020-06-06T22:23:22.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/1/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/1/authors"
}
}
}
},
{
"id": "2",
"type": "books",
"attributes": {
"title": "Miss Aubree Bernier Sr.",
"description": "Sed nulla tempora amet quod.",
"publication_year": "1987",
"created_at": "2020-06-06T22:23:22.000000Z",
"updated_at": "2020-06-06T22:23:22.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/2/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/2/authors"
}
}
}
},
{
"id": "3",
"type": "books",
"attributes": {
"title": "Herman Bartoletti",
"description": "Id beatae accusantium quam praesentium repellat ipsa maiores ut.",
"publication_year": "1996",
"created_at": "2020-06-06T22:23:22.000000Z",
"updated_at": "2020-06-06T22:23:22.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/3/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/3/authors"
}
}
}
}
],
"links": {
"first": "http://annas-bookstore.test/api/v1/books?include=authors&page%5Bnumber%5D=1",
"last": "http://annas-bookstore.test/api/v1/books?include=authors&page%5Bnumber%5D=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http://annas-bookstore.test/api/v1/books",
"per_page": 30,
"to": 3,
"total": 3
}
}].
Failed asserting that an array has the subset Array &0 (
'data' => Array &1 (
0 => Array &2 (
'id' => '1'
'type' => 'books'
'attributes' => Array &3 (
'title' => 'Dr. Freddie Kovacek'
'description' => 'Ipsam eius harum nam.'
'publication_year' => '1982'
'created_at' => '2020-06-06T22:23:22.000000Z'
'updated_at' => '2020-06-06T22:23:22.000000Z'
)
'relationships' => Array &4 (
'authors' => Array &5 (
'links' => Array &6 (
'self' => 'http://annas-bookstore.test/api/v1/books/1/relationships/authors'
'related' => 'http://annas-bookstore.test/api/v1/books/1/authors'
)
'data' => Array &7 (
0 => Array &8 (
'id' => '1'
'type' => 'authors'
)
1 => Array &9 (
'id' => '2'
'type' => 'authors'
)
2 => Array &10 (
'id' => '3'
'type' => 'authors'
)
)
)
)
)
1 => Array &11 (
'id' => '2'
'type' => 'books'
'attributes' => Array &12 (
'title' => 'Miss Aubree Bernier Sr.'
'description' => 'Sed nulla tempora amet quod.'
'publication_year' => '1987'
'created_at' => '2020-06-06T22:23:22.000000Z'
'updated_at' => '2020-06-06T22:23:22.000000Z'
)
'relationships' => Array &13 (
'authors' => Array &14 (
'links' => Array &15 (
'self' => 'http://annas-bookstore.test/api/v1/books/2/relationships/authors'
'related' => 'http://annas-bookstore.test/api/v1/books/2/authors'
)
)
)
)
2 => Array &16 (
'id' => '3'
'type' => 'books'
'attributes' => Array &17 (
'title' => 'Herman Bartoletti'
'description' => 'Id beatae accusantium quam praesentium repellat ipsa maiores ut.'
'publication_year' => '1996'
'created_at' => '2020-06-06T22:23:22.000000Z'
'updated_at' => '2020-06-06T22:23:22.000000Z'
)
'relationships' => Array &18 (
'authors' => Array &19 (
'links' => Array &20 (
'self' => 'http://annas-bookstore.test/api/v1/books/3/relationships/authors'
'related' => 'http://annas-bookstore.test/api/v1/books/3/authors'
)
)
)
)
)
'included' => Array &21 (
0 => Array &22 (
'id' => '1'
'type' => 'authors'
'attributes' => Array &23 (
'first_name' => 'Terrance'
'last_name' => 'Streich'
'other_name' => 'Kohler'
'created_at' => '2020-06-06T22:23:22.000000Z'
'updated_at' => '2020-06-06T22:23:22.000000Z'
)
)
1 => Array &24 (
'id' => '2'
'type' => 'authors'
'attributes' => Array &25 (
'first_name' => 'Emmitt'
'last_name' => 'Walsh'
'other_name' => 'O'Connell'
'created_at' => '2020-06-06T22:23:22.000000Z'
'updated_at' => '2020-06-06T22:23:22.000000Z'
)
)
2 => Array &26 (
'id' => '3'
'type' => 'authors'
'attributes' => Array &27 (
'first_name' => 'Jeramy'
'last_name' => 'Luettgen'
'other_name' => 'Pacocha'
'created_at' => '2020-06-06T22:23:22.000000Z'
'updated_at' => '2020-06-06T22:23:22.000000Z'
)
)
)
).
--- Expected
+++ Actual
@@ @@
'self' => 'http://annas-bookstore.test/api/v1/books/1/relationships/authors',
'related' => 'http://annas-bookstore.test/api/v1/books/1/authors',
),
- 'data' =>
- array (
- 0 =>
- array (
- 'id' => '1',
- 'type' => 'authors',
- ),
- 1 =>
- array (
- 'id' => '2',
- 'type' => 'authors',
- ),
- 2 =>
- array (
- 'id' => '3',
- 'type' => 'authors',
- ),
- ),
),
),
),
@@ @@
'per_page' => 30,
'to' => 3,
'total' => 3,
- ),
- 'included' =>
- array (
- 0 =>
- array (
- 'id' => '1',
- 'type' => 'authors',
- 'attributes' =>
- array (
- 'first_name' => 'Terrance',
- 'last_name' => 'Streich',
- 'other_name' => 'Kohler',
- 'created_at' => '2020-06-06T22:23:22.000000Z',
- 'updated_at' => '2020-06-06T22:23:22.000000Z',
- ),
- ),
- 1 =>
- array (
- 'id' => '2',
- 'type' => 'authors',
- 'attributes' =>
- array (
- 'first_name' => 'Emmitt',
- 'last_name' => 'Walsh',
- 'other_name' => 'O\'Connell',
- 'created_at' => '2020-06-06T22:23:22.000000Z',
- 'updated_at' => '2020-06-06T22:23:22.000000Z',
- ),
- ),
- 2 =>
- array (
- 'id' => '3',
- 'type' => 'authors',
- 'attributes' =>
- array (
- 'first_name' => 'Jeramy',
- 'last_name' => 'Luettgen',
- 'other_name' => 'Pacocha',
- 'created_at' => '2020-06-06T22:23:22.000000Z',
- 'updated_at' => '2020-06-06T22:23:22.000000Z',
- ),
- ),
),
)
Unable to find JSON:
[{
"data": [
{
"id": "1",
"type": "books",
"attributes": {
"title": "Prof. Baylee Morissette",
"description": "Assumenda qui deleniti perferendis nihil architecto.",
"publication_year": "2004",
"created_at": "2020-06-06T22:26:05.000000Z",
"updated_at": "2020-06-06T22:26:05.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/1/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/1/authors"
},
"data": [
{
"id": 1,
"type": "authors"
},
{
"id": 2,
"type": "authors"
},
{
"id": 3,
"type": "authors"
}
]
}
}
},
{
"id": "2",
"type": "books",
"attributes": {
"title": "Idell Kilback V",
"description": "Sed soluta eum corrupti blanditiis non ipsa rerum praesentium.",
"publication_year": "1984",
"created_at": "2020-06-06T22:26:05.000000Z",
"updated_at": "2020-06-06T22:26:05.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/2/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/2/authors"
},
"data": [
{
"id": 1,
"type": "authors"
},
{
"id": 2,
"type": "authors"
},
{
"id": 3,
"type": "authors"
}
]
}
}
},
{
"id": "3",
"type": "books",
"attributes": {
"title": "Delmer Padberg",
"description": "Possimus aut dicta laudantium sint voluptates.",
"publication_year": "2004",
"created_at": "2020-06-06T22:26:05.000000Z",
"updated_at": "2020-06-06T22:26:05.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/3/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/3/authors"
},
"data": [
{
"id": 1,
"type": "authors"
},
{
"id": 2,
"type": "authors"
},
{
"id": 3,
"type": "authors"
}
]
}
}
}
],
"included": [
{
"id": "1",
"type": "authors",
"attributes": {
"first_name": "Jefferey",
"last_name": "Bradtke",
"other_name": "Nikolaus",
"created_at": "2020-06-06T22:26:05.000000Z",
"updated_at": "2020-06-06T22:26:05.000000Z"
}
},
{
"id": "2",
"type": "authors",
"attributes": {
"first_name": "Randy",
"last_name": "Bahringer",
"other_name": "Trantow",
"created_at": "2020-06-06T22:26:05.000000Z",
"updated_at": "2020-06-06T22:26:05.000000Z"
}
},
{
"id": "3",
"type": "authors",
"attributes": {
"first_name": "Shannon",
"last_name": "Quitzon",
"other_name": "Von",
"created_at": "2020-06-06T22:26:05.000000Z",
"updated_at": "2020-06-06T22:26:05.000000Z"
}
}
]
}]
within response JSON:
[{
"data": [
{
"id": "1",
"type": "books",
"attributes": {
"title": "Prof. Baylee Morissette",
"description": "Assumenda qui deleniti perferendis nihil architecto.",
"publication_year": "2004",
"created_at": "2020-06-06T22:26:05.000000Z",
"updated_at": "2020-06-06T22:26:05.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/1/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/1/authors"
}
}
}
},
{
"id": "2",
"type": "books",
"attributes": {
"title": "Idell Kilback V",
"description": "Sed soluta eum corrupti blanditiis non ipsa rerum praesentium.",
"publication_year": "1984",
"created_at": "2020-06-06T22:26:05.000000Z",
"updated_at": "2020-06-06T22:26:05.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/2/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/2/authors"
}
}
}
},
{
"id": "3",
"type": "books",
"attributes": {
"title": "Delmer Padberg",
"description": "Possimus aut dicta laudantium sint voluptates.",
"publication_year": "2004",
"created_at": "2020-06-06T22:26:05.000000Z",
"updated_at": "2020-06-06T22:26:05.000000Z"
},
"relationships": {
"authors": {
"links": {
"self": "http://annas-bookstore.test/api/v1/books/3/relationships/authors",
"related": "http://annas-bookstore.test/api/v1/books/3/authors"
}
}
}
}
],
"links": {
"first": "http://annas-bookstore.test/api/v1/books?include=authors&page%5Bnumber%5D=1",
"last": "http://annas-bookstore.test/api/v1/books?include=authors&page%5Bnumber%5D=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http://annas-bookstore.test/api/v1/books",
"per_page": 30,
"to": 3,
"total": 3
}
}].
Failed asserting that an array has the subset Array &0 (
'data' => Array &1 (
0 => Array &2 (
'id' => '1'
'type' => 'books'
'attributes' => Array &3 (
'title' => 'Prof. Baylee Morissette'
'description' => 'Assumenda qui deleniti perferendis nihil architecto.'
'publication_year' => '2004'
'created_at' => '2020-06-06T22:26:05.000000Z'
'updated_at' => '2020-06-06T22:26:05.000000Z'
)
'relationships' => Array &4 (
'authors' => Array &5 (
'links' => Array &6 (
'self' => 'http://annas-bookstore.test/api/v1/books/1/relationships/authors'
'related' => 'http://annas-bookstore.test/api/v1/books/1/authors'
)
'data' => Array &7 (
0 => Array &8 (
'id' => 1
'type' => 'authors'
)
1 => Array &9 (
'id' => 2
'type' => 'authors'
)
2 => Array &10 (
'id' => 3
'type' => 'authors'
)
)
)
)
)
1 => Array &11 (
'id' => '2'
'type' => 'books'
'attributes' => Array &12 (
'title' => 'Idell Kilback V'
'description' => 'Sed soluta eum corrupti blanditiis non ipsa rerum praesentium.'
'publication_year' => '1984'
'created_at' => '2020-06-06T22:26:05.000000Z'
'updated_at' => '2020-06-06T22:26:05.000000Z'
)
'relationships' => Array &13 (
'authors' => Array &14 (
'links' => Array &15 (
'self' => 'http://annas-bookstore.test/api/v1/books/2/relationships/authors'
'related' => 'http://annas-bookstore.test/api/v1/books/2/authors'
)
'data' => Array &16 (
0 => Array &17 (
'id' => 1
'type' => 'authors'
)
1 => Array &18 (
'id' => 2
'type' => 'authors'
)
2 => Array &19 (
'id' => 3
'type' => 'authors'
)
)
)
)
)
2 => Array &20 (
'id' => '3'
'type' => 'books'
'attributes' => Array &21 (
'title' => 'Delmer Padberg'
'description' => 'Possimus aut dicta laudantium sint voluptates.'
'publication_year' => '2004'
'created_at' => '2020-06-06T22:26:05.000000Z'
'updated_at' => '2020-06-06T22:26:05.000000Z'
)
'relationships' => Array &22 (
'authors' => Array &23 (
'links' => Array &24 (
'self' => 'http://annas-bookstore.test/api/v1/books/3/relationships/authors'
'related' => 'http://annas-bookstore.test/api/v1/books/3/authors'
)
'data' => Array &25 (
0 => Array &26 (
'id' => 1
'type' => 'authors'
)
1 => Array &27 (
'id' => 2
'type' => 'authors'
)
2 => Array &28 (
'id' => 3
'type' => 'authors'
)
)
)
)
)
)
'included' => Array &29 (
0 => Array &30 (
'id' => '1'
'type' => 'authors'
'attributes' => Array &31 (
'first_name' => 'Jefferey'
'last_name' => 'Bradtke'
'other_name' => 'Nikolaus'
'created_at' => '2020-06-06T22:26:05.000000Z'
'updated_at' => '2020-06-06T22:26:05.000000Z'
)
)
1 => Array &32 (
'id' => '2'
'type' => 'authors'
'attributes' => Array &33 (
'first_name' => 'Randy'
'last_name' => 'Bahringer'
'other_name' => 'Trantow'
'created_at' => '2020-06-06T22:26:05.000000Z'
'updated_at' => '2020-06-06T22:26:05.000000Z'
)
)
2 => Array &34 (
'id' => '3'
'type' => 'authors'
'attributes' => Array &35 (
'first_name' => 'Shannon'
'last_name' => 'Quitzon'
'other_name' => 'Von'
'created_at' => '2020-06-06T22:26:05.000000Z'
'updated_at' => '2020-06-06T22:26:05.000000Z'
)
)
)
).
--- Expected
+++ Actual
@@ @@
'self' => 'http://annas-bookstore.test/api/v1/books/1/relationships/authors',
'related' => 'http://annas-bookstore.test/api/v1/books/1/authors',
),
- 'data' =>
- array (
- 0 =>
- array (
- 'id' => 1,
- 'type' => 'authors',
- ),
- 1 =>
- array (
- 'id' => 2,
- 'type' => 'authors',
- ),
- 2 =>
- array (
- 'id' => 3,
- 'type' => 'authors',
- ),
- ),
),
),
),
@@ @@
'self' => 'http://annas-bookstore.test/api/v1/books/2/relationships/authors',
'related' => 'http://annas-bookstore.test/api/v1/books/2/authors',
),
- 'data' =>
- array (
- 0 =>
- array (
- 'id' => 1,
- 'type' => 'authors',
- ),
- 1 =>
- array (
- 'id' => 2,
- 'type' => 'authors',
- ),
- 2 =>
- array (
- 'id' => 3,
- 'type' => 'authors',
- ),
- ),
),
),
),
@@ @@
'self' => 'http://annas-bookstore.test/api/v1/books/3/relationships/authors',
'related' => 'http://annas-bookstore.test/api/v1/books/3/authors',
),
- 'data' =>
- array (
- 0 =>
- array (
- 'id' => 1,
- 'type' => 'authors',
- ),
- 1 =>
- array (
- 'id' => 2,
- 'type' => 'authors',
- ),
- 2 =>
- array (
- 'id' => 3,
- 'type' => 'authors',
- ),
- ),
),
),
),
@@ @@
'per_page' => 30,
'to' => 3,
'total' => 3,
- ),
- 'included' =>
- array (
- 0 =>
- array (
- 'id' => '1',
- 'type' => 'authors',
- 'attributes' =>
- array (
- 'first_name' => 'Jefferey',
- 'last_name' => 'Bradtke',
- 'other_name' => 'Nikolaus',
- 'created_at' => '2020-06-06T22:26:05.000000Z',
- 'updated_at' => '2020-06-06T22:26:05.000000Z',
- ),
- ),
- 1 =>
- array (
- 'id' => '2',
- 'type' => 'authors',
- 'attributes' =>
- array (
- 'first_name' => 'Randy',
- 'last_name' => 'Bahringer',
- 'other_name' => 'Trantow',
- 'created_at' => '2020-06-06T22:26:05.000000Z',
- 'updated_at' => '2020-06-06T22:26:05.000000Z',
- ),
- ),
- 2 =>
- array (
- 'id' => '3',
- 'type' => 'authors',
- 'attributes' =>
- array (
- 'first_name' => 'Shannon',
- 'last_name' => 'Quitzon',
- 'other_name' => 'Von',
- 'created_at' => '2020-06-06T22:26:05.000000Z',
- 'updated_at' => '2020-06-06T22:26:05.000000Z',
- ),
- ),
),
)