/**
* 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');
}