From 0a4fbc977036ad708e3054f1df2cbc518d6af4d1 Mon Sep 17 00:00:00 2001 From: Vitali Yakavenka Date: Mon, 28 Nov 2011 21:54:54 +0300 Subject: [PATCH] Remove test for custom ID generator from AnnotationDriverTest as it duplicates one in AbstractMappingDriverTest --- .../ORM/Mapping/AbstractMappingDriverTest.php | 3 +- .../ORM/Mapping/AnnotationDriverTest.php | 28 ------------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php index 407276e5b..0b128710a 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php @@ -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; diff --git a/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php index 51270f73f..9273f7c6b 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php @@ -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 */