public function testGetEventManager() { $oom = $this->mock('Doctrine\\ORM\\EntityManagerInterface'); $oom->shouldReceive('getEventManager')->once()->andReturn('evm'); $om = new ObjectManager($oom); $this->assertEquals('evm', $om->getEventManager()); }