adds test for ResultSetMappingBuilder restriction
This commit is contained in:
parent
e879626d73
commit
87b4155665
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user