change tests
This commit is contained in:
parent
54a53b1d03
commit
6a89de51e5
@ -31,7 +31,7 @@ class DDC869Payment
|
||||
* @Column(type="integer")
|
||||
* @GeneratedValue
|
||||
*/
|
||||
private $id;
|
||||
protected $id;
|
||||
|
||||
/** @column(type="float") */
|
||||
protected $value;
|
||||
|
@ -295,7 +295,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
|
||||
/**
|
||||
* @group DDC-869
|
||||
*/
|
||||
public function testSuperclassWithRepository()
|
||||
public function testMappedSuperclassWithRepository()
|
||||
{
|
||||
if (strpos(get_class($this), 'PHPMappingDriver') !== false) {
|
||||
$this->markTestSkipped('PHP Mapping Drivers have no defaults.');
|
||||
|
@ -53,22 +53,11 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
|
||||
$this->assertTrue(isset($class->associationMappings['mappedRelated1']));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group DDC-869
|
||||
*/
|
||||
public function testGetMetadataForSubclassWithMappedSuperclassWhithRepository()
|
||||
{
|
||||
$class = $this->_factory->getMetadataFor('Doctrine\Tests\ORM\Mapping\SubclassWithoutRepository');
|
||||
|
||||
$this->assertTrue(empty($class->subClasses));
|
||||
$this->assertTrue(empty($class->parentClasses));
|
||||
$this->assertEquals($class->customRepositoryClassName, "App\Reposotories\SuperRepository");
|
||||
|
||||
|
||||
$class = $this->_factory->getMetadataFor('Doctrine\Tests\ORM\Mapping\SubclassWithRepository');
|
||||
|
||||
$this->assertTrue(empty($class->subClasses));
|
||||
$this->assertTrue(isset($class->fieldMappings['name']));
|
||||
$this->assertEquals($class->customRepositoryClassName, "App\Reposotories\SubRepository");
|
||||
|
||||
|
||||
$class = $this->_factory->getMetadataFor('Doctrine\Tests\Models\DDC869\DDC869CreditCardPayment');
|
||||
|
||||
$this->assertTrue(isset($class->fieldMappings['id']));
|
||||
@ -83,6 +72,14 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
|
||||
$this->assertTrue(isset($class->fieldMappings['value']));
|
||||
$this->assertTrue(isset($class->fieldMappings['serialNumber']));
|
||||
$this->assertEquals($class->customRepositoryClassName, "Doctrine\Tests\Models\DDC869\DDC869PaymentRepository");
|
||||
|
||||
|
||||
// override repositoryClass
|
||||
$class = $this->_factory->getMetadataFor('Doctrine\Tests\ORM\Mapping\SubclassWithRepository');
|
||||
|
||||
$this->assertTrue(isset($class->fieldMappings['id']));
|
||||
$this->assertTrue(isset($class->fieldMappings['value']));
|
||||
$this->assertEquals($class->customRepositoryClassName, "Doctrine\ORM\EntityRepository");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -312,27 +309,9 @@ class MediumSuperclassEntity extends MediumSuperclassBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @MappedSuperclass(repositoryClass = "App\Reposotories\SuperRepository")
|
||||
* @Entity(repositoryClass = "Doctrine\ORM\EntityRepository")
|
||||
*/
|
||||
abstract class SuperclassBaseWithRepository
|
||||
{
|
||||
/** @Id @Column(type="integer") */
|
||||
public $id;
|
||||
/** @Column(type="string") */
|
||||
public $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Entity
|
||||
*/
|
||||
class SubclassWithoutRepository extends SuperclassBaseWithRepository
|
||||
{
|
||||
|
||||
}
|
||||
/**
|
||||
* @Entity(repositoryClass = "App\Reposotories\SubRepository")
|
||||
*/
|
||||
class SubclassWithRepository extends SuperclassBaseWithRepository
|
||||
class SubclassWithRepository extends \Doctrine\Tests\Models\DDC869\DDC869Payment
|
||||
{
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user