Skip to content

Commit

Permalink
Fix PHPUnit/PHPCS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtyler committed Nov 18, 2024
1 parent dddb91a commit 8a93991
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/Serializer/JsonSerializationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use JMS\Serializer\Visitor\Factory\JsonSerializationVisitorFactory;
use JMS\Serializer\Visitor\SerializationVisitorInterface;
use PHPUnit\Framework\Attributes\DataProvider;
use TypeError;

class JsonSerializationTest extends BaseSerializationTestCase
{
Expand Down Expand Up @@ -487,6 +488,7 @@ public function testFalseDataType()
{
if (PHP_VERSION_ID < 80200) {
$this->markTestSkipped('False type requires PHP 8.2');

return;
}

Expand All @@ -500,11 +502,10 @@ public function testFalseDataType()
$this->deserialize(static::getContent('data_false'), DataFalse::class),
);

//What should we expect here?
self::assertEquals(
null,
$this->deserialize(static::getContent('data_true'), DataFalse::class),
);
$this->expectException(TypeError::class);
$this->expectExceptionMessage('Cannot assign true to property JMS\Serializer\Tests\Fixtures\DataFalse::$data of type false');

$this->deserialize(static::getContent('data_true'), DataFalse::class);
}

public function testDeserializingComplexDiscriminatedUnionProperties()
Expand Down

0 comments on commit 8a93991

Please sign in to comment.