1111
1212namespace JsonApiPhp \JsonApi \Test \Document \Resource ;
1313
14- use JsonApiPhp \JsonApi \Document \ArrayMeta ;
14+ use JsonApiPhp \JsonApi \Document \Meta ;
1515use JsonApiPhp \JsonApi \Document \Resource \Relationship \Relationship ;
1616use JsonApiPhp \JsonApi \Document \Resource \ResourceObject ;
1717use PHPUnit \Framework \TestCase ;
@@ -37,7 +37,7 @@ public function testCanNotSetRelationshipIfAttributeExists()
3737 {
3838 $ res = new ResourceObject ('books ' , '1 ' );
3939 $ res ->setAttribute ('foo ' , 'bar ' );
40- $ res ->setRelationship ('foo ' , Relationship::fromMeta (new ArrayMeta (['a ' => 'b ' ])));
40+ $ res ->setRelationship ('foo ' , Relationship::fromMeta (Meta:: fromArray (['a ' => 'b ' ])));
4141 }
4242
4343 /**
@@ -47,7 +47,7 @@ public function testCanNotSetRelationshipIfAttributeExists()
4747 public function testCanNotSetAttributeIfRelationshipExists ()
4848 {
4949 $ res = new ResourceObject ('books ' , '1 ' );
50- $ res ->setRelationship ('foo ' , Relationship::fromMeta (new ArrayMeta (['a ' => 'b ' ])));
50+ $ res ->setRelationship ('foo ' , Relationship::fromMeta (Meta:: fromArray (['a ' => 'b ' ])));
5151 $ res ->setAttribute ('foo ' , 'bar ' );
5252 }
5353
@@ -72,7 +72,7 @@ public function testAttributeCanNotHaveReservedNames(string $name)
7272 public function testRelationshipCanNotHaveReservedNames (string $ name )
7373 {
7474 $ res = new ResourceObject ('books ' , 'abc ' );
75- $ res ->setRelationship ($ name , Relationship::fromMeta (new ArrayMeta (['a ' => 'b ' ])));
75+ $ res ->setRelationship ($ name , Relationship::fromMeta (Meta:: fromArray (['a ' => 'b ' ])));
7676 }
7777
7878 public function invalidAttributeNames (): array
0 commit comments