@@ -132,11 +132,13 @@ public function is_adds_empty_hasone_relation_in_to_json_api_array()
132
132
/**
133
133
* @test
134
134
*/
135
- public function is_does_not_add_hasone_relation_without_data_links_and_meta_in_to_json_api_array ()
135
+ public function is_does_not_add_hasone_relation_without_data_in_to_json_api_array ()
136
136
{
137
137
$ item = new WithRelationshipItem ();
138
138
$ item ->setId ('1234 ' );
139
139
$ item ->hasoneRelation ();
140
+ $ item ->hasoneRelation ()->setLinks (new Links (['self ' => new Link ('http://example.com/articles ' )]));
141
+ $ item ->hasoneRelation ()->setMeta (new Meta (['foo ' => 'bar ' ]));
140
142
141
143
$ this ->assertSame (
142
144
[
@@ -211,11 +213,13 @@ public function is_adds_empty_hasmany_relation_in_to_json_api_array()
211
213
/**
212
214
* @test
213
215
*/
214
- public function is_does_not_add_hasmany_relation_without_data_links_and_meta_in_to_json_api_array ()
216
+ public function is_does_not_add_hasmany_relation_without_data_in_to_json_api_array ()
215
217
{
216
218
$ item = new WithRelationshipItem ();
217
219
$ item ->setId ('1234 ' );
218
220
$ item ->hasmanyRelation ();
221
+ $ item ->hasmanyRelation ()->setLinks (new Links (['self ' => new Link ('http://example.com/articles ' )]));
222
+ $ item ->hasmanyRelation ()->setMeta (new Meta (['foo ' => 'bar ' ]));
219
223
220
224
$ this ->assertSame (
221
225
[
@@ -288,11 +292,13 @@ public function is_adds_empty_morphto_relation_in_to_json_api_array()
288
292
/**
289
293
* @test
290
294
*/
291
- public function is_does_not_add_morphto_relation_without_data_links_and_meta_in_to_json_api_array ()
295
+ public function is_does_not_add_morphto_relation_without_data_in_to_json_api_array ()
292
296
{
293
297
$ item = new WithRelationshipItem ();
294
298
$ item ->setId ('1234 ' );
295
299
$ item ->morphtoRelation ();
300
+ $ item ->morphtoRelation ()->setLinks (new Links (['self ' => new Link ('http://example.com/articles ' )]));
301
+ $ item ->morphtoRelation ()->setMeta (new Meta (['foo ' => 'bar ' ]));
296
302
297
303
$ this ->assertSame (
298
304
[
@@ -367,11 +373,13 @@ public function is_adds_empty_morphtomany_relation_in_to_json_api_array()
367
373
/**
368
374
* @test
369
375
*/
370
- public function is_does_not_add_morphtomany_relation_without_data_links_and_meta_in_to_json_api_array ()
376
+ public function is_does_not_add_morphtomany_relation_without_data_in_to_json_api_array ()
371
377
{
372
378
$ item = new WithRelationshipItem ();
373
379
$ item ->setId ('1234 ' );
374
380
$ item ->morphtomanyRelation ();
381
+ $ item ->morphtomanyRelation ()->setLinks (new Links (['self ' => new Link ('http://example.com/articles ' )]));
382
+ $ item ->morphtomanyRelation ()->setMeta (new Meta (['foo ' => 'bar ' ]));
375
383
376
384
$ this ->assertSame (
377
385
[
0 commit comments