Doctrine\Tests\ODM\PHPCR\DocumentManagerTest::testGetRepository PHP Method

testGetRepository() public method

public testGetRepository ( )
    public function testGetRepository()
    {
        $session = $this->getMockBuilder('PHPCR\\SessionInterface')->getMock();
        $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'));
    }