Remove test for custom ID generator from AnnotationDriverTest as it duplicates one in AbstractMappingDriverTest
This commit is contained in:
parent
2b97f79bd3
commit
0a4fbc9770
@ -583,7 +583,8 @@ class User
|
||||
abstract class Animal
|
||||
{
|
||||
/**
|
||||
* @Id @Column(type="string") @GeneratedValue
|
||||
* @Id @Column(type="string") @GeneratedValue(strategy="CUSTOM")
|
||||
* @CustomIdGenerator(class="stdClass", args={"par1", "par2"})
|
||||
*/
|
||||
public $id;
|
||||
|
||||
|
@ -21,21 +21,6 @@ class AnnotationDriverTest extends AbstractMappingDriverTest
|
||||
$this->setExpectedException('Doctrine\ORM\Mapping\MappingException');
|
||||
$annotationDriver->loadMetadataForClass('stdClass', $cm);
|
||||
}
|
||||
|
||||
public function testLoadMetadataForClassSetsCustomGeneratorDefinition()
|
||||
{
|
||||
$cm = new ClassMetadata("Doctrine\Tests\ORM\Mapping\CustomIdGeneratorClass");
|
||||
$driver = $this->_loadDriver();
|
||||
$expected = array("class" => "\stdClass",
|
||||
"args" => array("par1", "par2"));
|
||||
|
||||
$driver->loadMetadataForClass(
|
||||
"Docrtine\Tests\ORM\Mapping\CustomIdGeneratorClass", $cm);
|
||||
|
||||
$this->assertEquals(ClassMetadata::GENERATOR_TYPE_CUSTOM, $cm->generatorType);
|
||||
$this->assertEquals($expected, $cm->customGeneratorDefinition);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @group DDC-268
|
||||
@ -230,19 +215,6 @@ class AnnotationDriverTest extends AbstractMappingDriverTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Entity
|
||||
*/
|
||||
class CustomIdGeneratorClass
|
||||
{
|
||||
/**
|
||||
* @Id @Column
|
||||
* @GeneratedValue(strategy="CUSTOM")
|
||||
* @CustomIdGenerator(class="\stdClass", args={"par1", "par2"})
|
||||
*/
|
||||
public $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Entity
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user