1
0
mirror of synced 2025-01-09 18:47:10 +03:00

adds test for ResultSetMappingBuilder restriction

This commit is contained in:
Johannes Schmitt 2014-01-04 18:06:16 +01:00
parent e879626d73
commit 87b4155665

View File

@ -313,6 +313,25 @@ class NativeQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this->assertEquals($user->name, $address->getUser()->getName());
}
/**
* @group rsm-sti
*/
public function testConcreteClassInSingleTableInheritanceSchemaWithRSMBuilderIsFine()
{
$rsm = new ResultSetMappingBuilder($this->_em);
$rsm->addRootEntityFromClassMetadata('Doctrine\Tests\Models\Company\CompanyFixContract', 'c');
}
/**
* @group rsm-sti
*/
public function testAbstractClassInSingleTableInheritanceSchemaWithRSMBuilderThrowsException()
{
$this->setExpectedException('\InvalidArgumentException', 'ResultSetMapping builder does not currently support your inheritance scheme.');
$rsm = new ResultSetMappingBuilder($this->_em);
$rsm->addRootEntityFromClassMetadata('Doctrine\Tests\Models\Company\CompanyContract', 'c');
}
/**
* @expectedException \InvalidArgumentException
*/