Skip to content

Commit

Permalink
#5935 #5684 #6020 #6152 removed useless NAME constant from the test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Nov 27, 2016
1 parent 73ea0ba commit cff5c07
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/DDC5684Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ protected function setUp()
{
parent::setUp();

if (DBALTypes\Type::hasType(DDC5684ObjectIdType::NAME)) {
DBALTypes\Type::overrideType(DDC5684ObjectIdType::NAME, DDC5684ObjectIdType::CLASSNAME);
if (DBALTypes\Type::hasType(DDC5684ObjectIdType::CLASSNAME)) {
DBALTypes\Type::overrideType(DDC5684ObjectIdType::CLASSNAME, DDC5684ObjectIdType::CLASSNAME);
} else {
DBALTypes\Type::addType(DDC5684ObjectIdType::NAME, DDC5684ObjectIdType::CLASSNAME);
DBALTypes\Type::addType(DDC5684ObjectIdType::CLASSNAME, DDC5684ObjectIdType::CLASSNAME);
}

$this->_schemaTool->createSchema([$this->_em->getClassMetadata(DDC5684Object::CLASSNAME)]);
Expand Down Expand Up @@ -60,7 +60,6 @@ public function testFetchObjectWithAutoIncrementedCustomType()

class DDC5684ObjectIdType extends DBALTypes\IntegerType
{
const NAME = 'ticket_5684_object_id';
const CLASSNAME = __CLASS__;

public function convertToPHPValue($value, AbstractPlatform $platform)
Expand All @@ -75,7 +74,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform)

public function getName()
{
return self::NAME;
return self::CLASSNAME;
}

public function requiresSQLCommentHint(AbstractPlatform $platform)
Expand Down Expand Up @@ -111,7 +110,7 @@ class DDC5684Object

/**
* @Id
* @Column(type="ticket_5684_object_id")
* @Column(type=Doctrine\Tests\ORM\Functional\Ticket\DDC5684ObjectIdType::class)
* @GeneratedValue(strategy="AUTO")
*/
public $id;
Expand Down

0 comments on commit cff5c07

Please sign in to comment.