From ad5c2b42accdd6ff05e4369a076c82cb0cc50e77 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..362ce71d 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 >= 80100) { + $this->assertEquals('void', $param->getSignatureType()); + } else { + $this->assertEquals('', $param->getSignatureType()); + } $param = new PhpStanType('void'); $this->assertEquals('void', $param->getDocBlockType());