Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move invalid code examples into separate test folder
  • Loading branch information
Art4 committed Jul 22, 2024
commit cdc01685e8172ede57aa92509565214a1578b495
4 changes: 3 additions & 1 deletion tests/Functional/ParsingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,9 @@ public function testParseCreateShortResourceWithoutId(): void
public function testExceptionIfIdIsNotString(): void
{
$this->expectException(\Art4\JsonApiClient\Exception\ValidationException::class);
$string = $this->getJsonString('16_type_and_id_as_integer.json');
$this->expectExceptionMessage('A resource id MUST be a string');

$string = $this->getJsonString('invalid/resource_id_must_be_a_string.json');
$document = Parser::parseResponseString($string);
}

Expand Down
7 changes: 0 additions & 7 deletions tests/Functional/SerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ public static function jsonapiDataProvider(): array
foreach ($filenames as $file) {
$filename = str_replace($path, '', $file);

// Ignore files with errors
if (in_array($filename, [
'16_type_and_id_as_integer.json',
])) {
continue;
}

$files[] = [
$filename,
in_array($filename, $requestFiles),
Expand Down