@@ -78,13 +78,17 @@ public function testCreateWithFullObject(): void
78
78
$ object ->attributes = new \stdClass ();
79
79
$ object ->relationships = new \stdClass ();
80
80
$ object ->links = new \stdClass ();
81
+ $ object ->fc = 'test property for forward compatability ' ;
81
82
82
83
$ item = new ResourceItem ($ object , $ this ->manager , $ this ->parent );
83
84
84
85
$ this ->assertInstanceOf (ResourceItem::class, $ item );
85
86
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 ' ));
88
92
$ this ->assertTrue ($ item ->has ('meta ' ));
89
93
$ this ->assertInstanceOf (Accessable::class, $ item ->get ('meta ' ));
90
94
$ this ->assertTrue ($ item ->has ('attributes ' ));
@@ -93,7 +97,8 @@ public function testCreateWithFullObject(): void
93
97
$ this ->assertInstanceOf (Accessable::class, $ item ->get ('relationships ' ));
94
98
$ this ->assertTrue ($ item ->has ('links ' ));
95
99
$ 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 ' ));
97
102
}
98
103
99
104
/**
0 commit comments