diff --git a/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php b/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php index bbdefb07d..73e222118 100644 --- a/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php @@ -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 */