diff --git a/tests/ProxyManagerTest/Functional/LazyLoadingValueHolderFunctionalTest.php b/tests/ProxyManagerTest/Functional/LazyLoadingValueHolderFunctionalTest.php index e59381f98..c3e0a748d 100644 --- a/tests/ProxyManagerTest/Functional/LazyLoadingValueHolderFunctionalTest.php +++ b/tests/ProxyManagerTest/Functional/LazyLoadingValueHolderFunctionalTest.php @@ -222,14 +222,13 @@ public function testWillAllowMultipleProxyInitialization() { $proxyClass = $this->generateProxy('ProxyManagerTestAsset\\BaseClass'); $counter = 0; - $initializer = function (& $wrappedInstance) use (& $counter) { + + /* @var $proxy BaseClass */ + $proxy = $proxyClass::staticProxyConstructor(function (& $wrappedInstance) use (& $counter) { $wrappedInstance = new BaseClass(); $wrappedInstance->publicProperty = (string) ($counter += 1); - }; - - /* @var $proxy BaseClass */ - $proxy = $proxyClass::staticProxyConstructor($initializer); + }); $this->assertSame('1', $proxy->publicProperty); $this->assertSame('2', $proxy->publicProperty);