Skip to content

Commit

Permalink
added test for Zend\ServiceManager\ServiceManager::get : testGetAbstr…
Browse files Browse the repository at this point in the history
…actFactoryWithAlias
  • Loading branch information
jmleroux committed Jan 28, 2014
1 parent ac1f8c1 commit 18c0e2b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/ZendTest/ServiceManager/ServiceManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,16 @@ public function testGetWithAlias()
$this->assertEquals('bar', $this->serviceManager->get('baz'));
}

/**
* @covers Zend\ServiceManager\ServiceManager::get
*/
public function testGetAbstractFactoryWithAlias()
{
$this->serviceManager->addAbstractFactory('ZendTest\ServiceManager\TestAsset\FooAbstractFactory');
$this->serviceManager->setAlias('foo', 'ZendTest\ServiceManager\TestAsset\FooAbstractFactory');
$this->assertInstanceOf('ZendTest\ServiceManager\TestAsset\Foo', $this->serviceManager->get('foo'));
}

/**
* @covers Zend\ServiceManager\ServiceManager::get
*/
Expand Down

0 comments on commit 18c0e2b

Please sign in to comment.