/** * @covers Doctrine\ODM\PHPCR\DocumentManager::getRepository */ public function testGetRepository() { $session = $this->getMock('PHPCR\\SessionInterface'); $dm = new DocumentManagerGetClassMetadata($session); $this->assertInstanceOf('Doctrine\\ODM\\PHPCR\\DocumentRepository', $dm->getRepository('foo')); $this->assertInstanceOf('stdClass', $dm->getRepository('foo2')); // call again to test the cache $this->assertInstanceOf('Doctrine\\ODM\\PHPCR\\DocumentRepository', $dm->getRepository('foo')); }