@@ -78,13 +78,17 @@ public function testCreateWithFullObject(): void
7878 $ object ->attributes = new \stdClass ();
7979 $ object ->relationships = new \stdClass ();
8080 $ object ->links = new \stdClass ();
81+ $ object ->fc = 'test property for forward compatability ' ;
8182
8283 $ item = new ResourceItem ($ object , $ this ->manager , $ this ->parent );
8384
8485 $ this ->assertInstanceOf (ResourceItem::class, $ item );
8586
86- $ this ->assertSame ($ item ->get ('type ' ), 'type ' );
87- $ this ->assertSame ($ item ->get ('id ' ), '789 ' );
87+ $ this ->assertSame (['type ' , 'id ' , 'meta ' , 'attributes ' , 'relationships ' , 'links ' , 'fc ' ], $ item ->getKeys ());
88+ $ this ->assertTrue ($ item ->has ('type ' ));
89+ $ this ->assertSame ('type ' , $ item ->get ('type ' ));
90+ $ this ->assertTrue ($ item ->has ('id ' ));
91+ $ this ->assertSame ('789 ' , $ item ->get ('id ' ));
8892 $ this ->assertTrue ($ item ->has ('meta ' ));
8993 $ this ->assertInstanceOf (Accessable::class, $ item ->get ('meta ' ));
9094 $ this ->assertTrue ($ item ->has ('attributes ' ));
@@ -93,7 +97,8 @@ public function testCreateWithFullObject(): void
9397 $ this ->assertInstanceOf (Accessable::class, $ item ->get ('relationships ' ));
9498 $ this ->assertTrue ($ item ->has ('links ' ));
9599 $ this ->assertInstanceOf (Accessable::class, $ item ->get ('links ' ));
96- $ this ->assertSame ($ item ->getKeys (), ['type ' , 'id ' , 'meta ' , 'attributes ' , 'relationships ' , 'links ' ]);
100+ $ this ->assertTrue ($ item ->has ('fc ' ));
101+ $ this ->assertSame ('test property for forward compatability ' , $ item ->get ('fc ' ));
97102 }
98103
99104 /**
0 commit comments