1
0
mirror of synced 2025-01-30 20:11:49 +03:00

Add test for DDC-1156, DDC-1218

This commit is contained in:
Benjamin Eberlei 2011-06-25 09:57:15 +02:00
parent a5cddb0c11
commit fe8b28a09f

View File

@ -100,6 +100,19 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase
$this->assertTrue(isset($class->fieldMappings['id']));
}
/**
* @group DDC-1156
* @group DDC-1218
*/
public function testGeneratedValueFromMappedSuperclass()
{
$class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\SuperclassEntity');
/* @var $class ClassMetadataInfo */
$this->assertInstanceOf('Doctrine\ORM\Id\SequenceGenerator', $class->idGenerator);
$this->assertEquals(array('allocationSize' => 1, 'initialValue' => 10, 'sequenceName' => 'foo'), $class->sequenceGeneratorDefinition);
}
}
class TransientBaseClass {
@ -216,7 +229,7 @@ class SuperclassEntity extends SuperclassBase
abstract class SuperclassBase
{
/**
* @Column(type="integer") @Id @GeneratedValue
* @Column(type="integer") @Id @GeneratedValue(strategy="SEQUENCE") @SequenceGenerator(sequenceName="foo", initialValue="10")
* @var int
*/
public $id;