From 930484fc4a29a131d06bc000ac068a041e491373 Mon Sep 17 00:00:00 2001 From: smoench Date: Thu, 17 Dec 2020 15:58:39 +0100 Subject: [PATCH] fix tests --- tests/Compactor/PhpTest.php | 4 ++-- .../ConfigurationPhpCompactorTest.php | 16 ++++------------ tests/PhpScoper/SerializablePhpScoperTest.php | 4 +++- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/tests/Compactor/PhpTest.php b/tests/Compactor/PhpTest.php index 213d9ec22..666171b3b 100644 --- a/tests/Compactor/PhpTest.php +++ b/tests/Compactor/PhpTest.php @@ -111,7 +111,7 @@ class AClass */ public function aMethod() { - \$test = true;# a comment + \$test = true; } } PHP @@ -130,7 +130,7 @@ class AClass public function aMethod() { \$test = true; - } +} } PHP ]; diff --git a/tests/Configuration/ConfigurationPhpCompactorTest.php b/tests/Configuration/ConfigurationPhpCompactorTest.php index 6cbb45060..b9cd948fc 100644 --- a/tests/Configuration/ConfigurationPhpCompactorTest.php +++ b/tests/Configuration/ConfigurationPhpCompactorTest.php @@ -231,7 +231,6 @@ public function providePhpContentsToCompact(): Generator * @Acme(type = "function") */ function foo($x, $y): int { - // Compare the two values return $x <=> $y; } PHP @@ -253,8 +252,7 @@ function foo($x, $y): int { */ function foo($x, $y): int { - - return $x <=> $y; +return $x <=> $y; } PHP ]; @@ -293,7 +291,6 @@ function foo($x, $y): int { * @Acme(type = "function") */ function foo($x, $y): int { - // Compare the two values return $x <=> $y; } PHP @@ -315,8 +312,7 @@ function foo($x, $y): int { */ function foo($x, $y): int { - - return $x <=> $y; +return $x <=> $y; } PHP ]; @@ -350,7 +346,6 @@ function foo($x, $y): int { * @Acme(type = "function") */ function foo($x, $y): int { - // Compare the two values return $x <=> $y; } PHP @@ -372,8 +367,7 @@ function foo($x, $y): int { */ function foo($x, $y): int { - - return $x <=> $y; +return $x <=> $y; } PHP ]; @@ -400,7 +394,6 @@ function foo($x, $y): int { * @Acme(type = "function") */ function foo($x, $y): int { - // Compare the two values return $x <=> $y; } PHP @@ -422,8 +415,7 @@ function foo($x, $y): int { */ function foo($x, $y): int { - - return $x <=> $y; +return $x <=> $y; } PHP ]; diff --git a/tests/PhpScoper/SerializablePhpScoperTest.php b/tests/PhpScoper/SerializablePhpScoperTest.php index 5045f3d0a..3470dce08 100644 --- a/tests/PhpScoper/SerializablePhpScoperTest.php +++ b/tests/PhpScoper/SerializablePhpScoperTest.php @@ -180,7 +180,9 @@ public function scope(string $filePath, string $contents, string $prefix, array static function () use ($scoper) { return $scoper; }, - "Serialization of 'class@anonymous' is not allowed", + PHP_VERSION_ID < 80000 + ? "Serialization of 'class@anonymous' is not allowed" + : "Serialization of 'Humbug\PhpScoper\Scoper@anonymous' is not allowed", ]; })(); }