From c94f2cf810c30d4df93a8acc11b14dbe9b2a5356 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 2 Dec 2024 17:36:12 +0000 Subject: [PATCH] test different behaviour for php 8.1 and 8.2-onwards --- generator/tests/PhpStanFunctions/PhpStanTypeTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generator/tests/PhpStanFunctions/PhpStanTypeTest.php b/generator/tests/PhpStanFunctions/PhpStanTypeTest.php index 1fc861aa..79fac21e 100644 --- a/generator/tests/PhpStanFunctions/PhpStanTypeTest.php +++ b/generator/tests/PhpStanFunctions/PhpStanTypeTest.php @@ -112,7 +112,11 @@ public function testVoid(): void { $param = new PhpStanType(''); $this->assertEquals('', $param->getDocBlockType()); - $this->assertEquals('void', $param->getSignatureType()); + if (PHP_VERSION_ID >= 80200) { + $this->assertEquals('void', $param->getSignatureType()); + } else { + $this->assertEquals('', $param->getSignatureType()); + } $param = new PhpStanType('void'); $this->assertEquals('void', $param->getDocBlockType());