/** * @covers PPI\Framework\ServiceManager::get */ public function testDuplicateNewInstanceMultipleAbstractFactories() { $this->serviceManager->setAllowOverride(true); $this->serviceManager->setShareByDefault(false); $this->serviceManager->addAbstractFactory('PPI\\FrameworkTest\\ServiceManager\\Fixtures\\BarAbstractFactory'); $this->serviceManager->addAbstractFactory('PPI\\FrameworkTest\\ServiceManager\\Fixtures\\FooAbstractFactory'); $this->assertInstanceOf('PPI\\FrameworkTest\\ServiceManager\\Fixtures\\Bar', $this->serviceManager->get('bar')); $this->assertInstanceOf('PPI\\FrameworkTest\\ServiceManager\\Fixtures\\Bar', $this->serviceManager->get('bar')); }