Skip to content

Commit

Permalink
temporary fix for unknown properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Art4 committed Nov 28, 2023
1 parent 67576b4 commit 5b94439
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/Functional/SerializerTest.php
Expand Up @@ -78,9 +78,14 @@ public function testParseJsonapiDataWithErrorAbortManager(string $filename, bool

$document = $manager->parse($input);

$expected = json_decode($string, true);
// TODO #90: Add support for unknown properties
unset($expected['jsonapi']['ext']);

Check failure on line 83 in tests/Functional/SerializerTest.php

View workflow job for this annotation

GitHub Actions / Run PHPStan with PHP 8.2

Cannot access offset 'ext' on mixed.

Check failure on line 83 in tests/Functional/SerializerTest.php

View workflow job for this annotation

GitHub Actions / Run PHPStan with PHP 8.2

Cannot access offset 'jsonapi' on mixed.

Check failure on line 83 in tests/Functional/SerializerTest.php

View workflow job for this annotation

GitHub Actions / Run PHPStan with PHP 8.2

Cannot access offset 'ext' on mixed.

Check failure on line 83 in tests/Functional/SerializerTest.php

View workflow job for this annotation

GitHub Actions / Run PHPStan with PHP 8.2

Cannot access offset 'jsonapi' on mixed.
unset($expected['jsonapi']['profile']);

Check failure on line 84 in tests/Functional/SerializerTest.php

View workflow job for this annotation

GitHub Actions / Run PHPStan with PHP 8.2

Cannot access offset 'jsonapi' on mixed.

Check failure on line 84 in tests/Functional/SerializerTest.php

View workflow job for this annotation

GitHub Actions / Run PHPStan with PHP 8.2

Cannot access offset 'profile' on mixed.

Check failure on line 84 in tests/Functional/SerializerTest.php

View workflow job for this annotation

GitHub Actions / Run PHPStan with PHP 8.2

Cannot access offset 'jsonapi' on mixed.

Check failure on line 84 in tests/Functional/SerializerTest.php

View workflow job for this annotation

GitHub Actions / Run PHPStan with PHP 8.2

Cannot access offset 'profile' on mixed.

// Test full array
$this->assertEquals(
json_decode($string, true),
$expected,
(new ArraySerializer(['recursive' => true]))->serialize($document),
$filename
);
Expand Down

0 comments on commit 5b94439

Please sign in to comment.