@@ -132,11 +132,13 @@ public function is_adds_empty_hasone_relation_in_to_json_api_array()
132132 /**
133133 * @test
134134 */
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 ()
136136 {
137137 $ item = new WithRelationshipItem ();
138138 $ item ->setId ('1234 ' );
139139 $ item ->hasoneRelation ();
140+ $ item ->hasoneRelation ()->setLinks (new Links (['self ' => new Link ('http://example.com/articles ' )]));
141+ $ item ->hasoneRelation ()->setMeta (new Meta (['foo ' => 'bar ' ]));
140142
141143 $ this ->assertSame (
142144 [
@@ -211,11 +213,13 @@ public function is_adds_empty_hasmany_relation_in_to_json_api_array()
211213 /**
212214 * @test
213215 */
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 ()
215217 {
216218 $ item = new WithRelationshipItem ();
217219 $ item ->setId ('1234 ' );
218220 $ item ->hasmanyRelation ();
221+ $ item ->hasmanyRelation ()->setLinks (new Links (['self ' => new Link ('http://example.com/articles ' )]));
222+ $ item ->hasmanyRelation ()->setMeta (new Meta (['foo ' => 'bar ' ]));
219223
220224 $ this ->assertSame (
221225 [
@@ -288,11 +292,13 @@ public function is_adds_empty_morphto_relation_in_to_json_api_array()
288292 /**
289293 * @test
290294 */
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 ()
292296 {
293297 $ item = new WithRelationshipItem ();
294298 $ item ->setId ('1234 ' );
295299 $ item ->morphtoRelation ();
300+ $ item ->morphtoRelation ()->setLinks (new Links (['self ' => new Link ('http://example.com/articles ' )]));
301+ $ item ->morphtoRelation ()->setMeta (new Meta (['foo ' => 'bar ' ]));
296302
297303 $ this ->assertSame (
298304 [
@@ -367,11 +373,13 @@ public function is_adds_empty_morphtomany_relation_in_to_json_api_array()
367373 /**
368374 * @test
369375 */
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 ()
371377 {
372378 $ item = new WithRelationshipItem ();
373379 $ item ->setId ('1234 ' );
374380 $ item ->morphtomanyRelation ();
381+ $ item ->morphtomanyRelation ()->setLinks (new Links (['self ' => new Link ('http://example.com/articles ' )]));
382+ $ item ->morphtomanyRelation ()->setMeta (new Meta (['foo ' => 'bar ' ]));
375383
376384 $ this ->assertSame (
377385 [
0 commit comments