Skip to content

Commit f67a8fc

Browse files
committed
tests: fix phpstan error
1 parent 907bf02 commit f67a8fc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/Unit/Serializer/JsonSerializerTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,13 @@ public static function getInvalidEncodedData(): array
7474
{
7575
return [
7676
[
77-
'Catched error "Syntax error" while decoding JSON: ',
7877
'',
78+
'Catched error "Syntax error" while decoding JSON: ',
7979
],
8080
[
81-
'Catched error "Syntax error" while decoding JSON: ["foo":"bar"]',
8281
'["foo":"bar"]',
82+
/** @phpstan-ignore smaller.alwaysTrue(Remove this line after release of PHP 8.6) */
83+
(PHP_VERSION_ID < 80600) ? 'Catched error "Syntax error" while decoding JSON: ["foo":"bar"]' : 'Catched error "Syntax error near location 1:7" while decoding JSON: ["foo":"bar"]',
8384
],
8485
];
8586
}
@@ -88,7 +89,7 @@ public static function getInvalidEncodedData(): array
8889
* @dataProvider getInvalidEncodedData
8990
*/
9091
#[DataProvider('getInvalidEncodedData')]
91-
public function testCreateFromStringWithInvalidStringThrowsException(string $message, string $data): void
92+
public function testCreateFromStringWithInvalidStringThrowsException(string $data, string $message): void
9293
{
9394
$this->expectException(SerializerException::class);
9495
$this->expectExceptionMessage($message);

0 commit comments

Comments
 (0)