1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Remove test for custom ID generator from AnnotationDriverTest as it duplicates one in AbstractMappingDriverTest

This commit is contained in:
Vitali Yakavenka 2011-11-28 21:54:54 +03:00
parent 2b97f79bd3
commit 0a4fbc9770
2 changed files with 2 additions and 29 deletions

View File

@ -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;

View File

@ -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
*/