getServiceContainer() public method

Retrieve the service container.
public getServiceContainer ( ) : metamodels\IMetaModelsServiceContainer
return metamodels\IMetaModelsServiceContainer
Exemplo n.º 1
0
 /**
  * Test to add an attribute factory to a factory and retrieve it again.
  *
  * @return void
  */
 public function testCreateMetaModelFiresEvent()
 {
     $serviceContainer = $this->mockServiceContainer(true);
     $factory = new Factory();
     $factory->setServiceContainer($serviceContainer);
     $serviceContainer->getEventDispatcher()->expects($this->exactly(1))->method('dispatch')->with($this->equalTo(CreateMetaModelEvent::NAME));
     $this->assertSame($serviceContainer, $factory->getServiceContainer());
     $factory->getMetaModel('mm_test');
 }