Skip to content

Commit

Permalink
Simplified test code (avoiding unused assignment)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Oct 1, 2014
1 parent 72ab055 commit 0a61ffc
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0a61ffc

Please sign in to comment.