diff --git a/tests/Functional/ParsingTest.php b/tests/Functional/ParsingTest.php index ea88979..8729849 100644 --- a/tests/Functional/ParsingTest.php +++ b/tests/Functional/ParsingTest.php @@ -656,7 +656,9 @@ public function testParseNormativeStatementsForVersion10Correctly(): void $this->assertInstanceOf('Art4\JsonApiClient\V1\Document', $document); $this->assertSame(['data', 'included', 'jsonapi'], $document->getKeys()); $this->assertSame('1.0', $document->get('jsonapi.version')); + $this->assertInstanceOf(Accessable::class, $document->get('data')); $this->assertCount(6, $document->get('data')->getKeys()); + $this->assertInstanceOf(Accessable::class, $document->get('included')); $this->assertCount(184, $document->get('included')->getKeys()); } @@ -668,7 +670,9 @@ public function testParseNormativeStatementsForVersion11Correctly(): void $this->assertInstanceOf('Art4\JsonApiClient\V1\Document', $document); $this->assertSame(['data', 'included', 'jsonapi'], $document->getKeys()); $this->assertSame('1.1', $document->get('jsonapi.version')); + $this->assertInstanceOf(Accessable::class, $document->get('data')); $this->assertCount(6, $document->get('data')->getKeys()); + $this->assertInstanceOf(Accessable::class, $document->get('included')); $this->assertCount(188, $document->get('included')->getKeys()); } @@ -679,8 +683,9 @@ public function testParseJsonApiObjectWithVersion11Correctly(): void $this->assertInstanceOf('Art4\JsonApiClient\V1\Document', $document); $this->assertSame(['meta', 'jsonapi'], $document->getKeys()); + $this->assertInstanceOf(Accessable::class, $document->get('jsonapi')); $this->assertSame(['version'], $document->get('jsonapi')->getKeys()); - // TODO: Add support for unknown properties + // TODO #90: Add support for unknown properties // $this->assertSame(['version', 'ext', 'profile'], $document->get('jsonapi')->getKeys()); $this->assertSame('1.1', $document->get('jsonapi.version')); }