diff --git a/Neos.Flow/Tests/Functional/Reflection/Fixtures/PHP8/DummyClassWithUnionTypeHints.php b/Neos.Flow/Tests/Functional/Reflection/Fixtures/DummyClassWithUnionTypeHints.php similarity index 91% rename from Neos.Flow/Tests/Functional/Reflection/Fixtures/PHP8/DummyClassWithUnionTypeHints.php rename to Neos.Flow/Tests/Functional/Reflection/Fixtures/DummyClassWithUnionTypeHints.php index 25e2347473..424ce8bb3c 100644 --- a/Neos.Flow/Tests/Functional/Reflection/Fixtures/PHP8/DummyClassWithUnionTypeHints.php +++ b/Neos.Flow/Tests/Functional/Reflection/Fixtures/DummyClassWithUnionTypeHints.php @@ -1,5 +1,5 @@ <?php -namespace Neos\Flow\Tests\Functional\Reflection\Fixtures\PHP8; +namespace Neos\Flow\Tests\Functional\Reflection\Fixtures; /* * This file is part of the Neos.Flow package. diff --git a/Neos.Flow/Tests/Functional/Reflection/ReflectionServiceTest.php b/Neos.Flow/Tests/Functional/Reflection/ReflectionServiceTest.php index c2cb5ecf95..1455fa7a08 100644 --- a/Neos.Flow/Tests/Functional/Reflection/ReflectionServiceTest.php +++ b/Neos.Flow/Tests/Functional/Reflection/ReflectionServiceTest.php @@ -12,12 +12,12 @@ */ use Neos\Flow\Reflection\ReflectionService; +use Neos\Flow\Tests\Functional\Persistence; +use Neos\Flow\Tests\Functional\Reflection; use Neos\Flow\Tests\Functional\Reflection\Fixtures\Model\SubEntity; use Neos\Flow\Tests\Functional\Reflection\Fixtures\Model\SubSubEntity; use Neos\Flow\Tests\Functional\Reflection\Fixtures\Model\SubSubSubEntity; use Neos\Flow\Tests\FunctionalTestCase; -use Neos\Flow\Tests\Functional\Reflection; -use Neos\Flow\Tests\Functional\Persistence; /** * Functional tests for the Reflection Service features @@ -356,12 +356,9 @@ public function annotatedArrayTypeHintsWorkCorrectly() */ public function unionReturnTypesWorkCorrectly() { - if (PHP_MAJOR_VERSION < 8) { - $this->markTestSkipped('Only for PHP 8 with UnionTypes'); - } - $returnTypeA = $this->reflectionService->getMethodDeclaredReturnType(Reflection\Fixtures\PHP8\DummyClassWithUnionTypeHints::class, 'methodWithUnionReturnTypeA'); - $returnTypeB = $this->reflectionService->getMethodDeclaredReturnType(Reflection\Fixtures\PHP8\DummyClassWithUnionTypeHints::class, 'methodWithUnionReturnTypesB'); - $returnTypeC = $this->reflectionService->getMethodDeclaredReturnType(Reflection\Fixtures\PHP8\DummyClassWithUnionTypeHints::class, 'methodWithUnionReturnTypesC'); + $returnTypeA = $this->reflectionService->getMethodDeclaredReturnType(Fixtures\DummyClassWithUnionTypeHints::class, 'methodWithUnionReturnTypeA'); + $returnTypeB = $this->reflectionService->getMethodDeclaredReturnType(Fixtures\DummyClassWithUnionTypeHints::class, 'methodWithUnionReturnTypesB'); + $returnTypeC = $this->reflectionService->getMethodDeclaredReturnType(Fixtures\DummyClassWithUnionTypeHints::class, 'methodWithUnionReturnTypesC'); self::assertEquals('string|false', $returnTypeA); self::assertEquals('\Neos\Flow\Tests\Functional\Reflection\Fixtures\PHP8\DummyClassWithUnionTypeHints|false', $returnTypeB);