Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request zendframework#4746 from Ocramius/bump/proxymanager…
Browse files Browse the repository at this point in the history
…-dependency-bump

Bumping supported ProxyManager version
  • Loading branch information
weierophinney committed Jul 1, 2013
2 parents e238857 + 24dfba1 commit fee8365
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"doctrine/annotations": ">=1.0",
"ircmaxell/random-lib": "dev-master",
"ircmaxell/security-lib": "dev-master",
"ocramius/proxy-manager": "0.3.*",
"ocramius/proxy-manager": "0.4.*",
"phpunit/PHPUnit": "3.7.*"
},
"suggest": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,16 @@ public function testAutoGenerateProxyFiles()
$serviceManager->addDelegator('foo', 'foo-delegator');

/* @var $proxy self|\ProxyManager\Proxy\ValueHolderInterface|\ProxyManager\Proxy\LazyLoadingInterface */
$proxy = $serviceManager->create('foo');
$proxy = $serviceManager->create('foo');
$proxyClassName = get_class($proxy);

$this->assertInstanceOf('ProxyManager\\Proxy\\LazyLoadingInterface', $proxy);
$this->assertInstanceOf(__CLASS__, $proxy);
$this->assertSame(
$namespace . '\__PM__\ZendTest\ServiceManager\Proxy\LazyServiceFactoryFactoryTest',
get_class($proxy)
);
$this->assertFileExists(
sys_get_temp_dir() . '/' . $namespace . '__PM__ZendTestServiceManagerProxyLazyServiceFactoryFactoryTest.php'
$this->assertStringMatchesFormat(
$namespace . '\__PM__\ZendTest\ServiceManager\Proxy\LazyServiceFactoryFactoryTest%s',
$proxyClassName
);
$this->assertFileExists(sys_get_temp_dir() . '/' . str_replace('\\', '', $proxyClassName) . '.php');
$this->assertFalse($proxy->isProxyInitialized());
$this->assertEquals($this->invalidConfigProvider(), $proxy->invalidConfigProvider());
$this->assertTrue($proxy->isProxyInitialized());
Expand All @@ -99,17 +98,16 @@ public function testAutoGenerateAndEvaluateProxies()
$serviceManager->addDelegator('foo', 'foo-delegator');

/* @var $proxy self|\ProxyManager\Proxy\ValueHolderInterface|\ProxyManager\Proxy\LazyLoadingInterface */
$proxy = $serviceManager->create('foo');
$proxy = $serviceManager->create('foo');
$proxyClassName = get_class($proxy);

$this->assertInstanceOf('ProxyManager\\Proxy\\LazyLoadingInterface', $proxy);
$this->assertInstanceOf(__CLASS__, $proxy);
$this->assertSame(
$namespace . '\__PM__\ZendTest\ServiceManager\Proxy\LazyServiceFactoryFactoryTest',
get_class($proxy)
);
$this->assertFileNotExists(
sys_get_temp_dir() . '/' . $namespace . '__PM__ZendTestServiceManagerProxyLazyServiceFactoryFactoryTest.php'
$this->assertStringMatchesFormat(
$namespace . '\__PM__\ZendTest\ServiceManager\Proxy\LazyServiceFactoryFactoryTest%s',
$proxyClassName
);
$this->assertFileNotExists(sys_get_temp_dir() . '/' . str_replace('\\', '', $proxyClassName) . '.php');
$this->assertFalse($proxy->isProxyInitialized());
$this->assertEquals($this->invalidConfigProvider(), $proxy->invalidConfigProvider());
$this->assertTrue($proxy->isProxyInitialized());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class LazyServiceFactoryTest extends \PHPUnit_Framework_TestCase
*/
protected $proxyFactory;

/**
* @var \Zend\ServiceManager\ServiceLocatorInterface|\PHPUnit_Framework_MockObject_MockObject
*/
protected $locator;

/**
Expand Down

0 comments on commit fee8365

Please sign in to comment.