diff --git a/tests/ProxyManagerTest/Functional/LazyLoadingGhostFunctionalTest.php b/tests/ProxyManagerTest/Functional/LazyLoadingGhostFunctionalTest.php index 60c04bb12..3cc21b82a 100644 --- a/tests/ProxyManagerTest/Functional/LazyLoadingGhostFunctionalTest.php +++ b/tests/ProxyManagerTest/Functional/LazyLoadingGhostFunctionalTest.php @@ -853,19 +853,17 @@ public function getPropertyAccessProxies() * * @param string $className * @param string $propertyName - * @param string $expected + * @param mixed $expected * @param string[] $proxyOptions */ - public function testSkipProperties($className, $propertyName, $expected, $proxyOptions) + public function testSkipProperties($className, $propertyName, $proxyOptions, $expected) { - $proxy = $this->generateProxy($className, $proxyOptions); - $ghostObject = $proxy::staticProxyConstructor( - function () use ($propertyName) { - $this->fail(sprintf('The Property "%s" was not expected to be lazy-loaded', $propertyName)); - } - ); + $proxy = $this->generateProxy($className, $proxyOptions); + $ghostObject = $proxy::staticProxyConstructor(function () use ($propertyName) { + $this->fail(sprintf('The Property "%s" was not expected to be lazy-loaded', $propertyName)); + }); - $property = new \ReflectionProperty($className, $propertyName); + $property = new ReflectionProperty($className, $propertyName); $property->setAccessible(true); $this->assertSame($expected, $property->getValue($ghostObject)); @@ -876,13 +874,11 @@ function () use ($propertyName) { * * @param string $className * @param string $propertyName - * @param string $expected * @param string[] $proxyOptions */ public function testSkippedPropertiesAreNotOverwrittenOnInitialization( $className, $propertyName, - $expected, $proxyOptions ) { $proxyName = $this->generateProxy($className, $proxyOptions); @@ -893,7 +889,7 @@ public function testSkippedPropertiesAreNotOverwrittenOnInitialization( return true; }); - $property = new \ReflectionProperty($className, $propertyName); + $property = new ReflectionProperty($className, $propertyName); $property->setAccessible(true); @@ -916,38 +912,38 @@ public function skipPropertiesFixture() [ ClassWithPublicProperties::class, 'property9', - 'property9', [ 'skippedProperties' => ["property9"] - ] + ], + 'property9', ], [ ClassWithProtectedProperties::class, 'property9', - 'property9', [ 'skippedProperties' => ["\0*\0property9"] - ] + ], + 'property9', ], [ ClassWithPrivateProperties::class, 'property9', - 'property9', [ 'skippedProperties' => [ "\0ProxyManagerTestAsset\\ClassWithPrivateProperties\0property9" ] - ] + ], + 'property9', ], [ ClassWithCollidingPrivateInheritedProperties::class, 'property0', - 'childClassProperty0', [ 'skippedProperties' => [ "\0ProxyManagerTestAsset\\ClassWithCollidingPrivateInheritedProperties\0property0" ] - ] + ], + 'childClassProperty0', ], ]; }