1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Removed reliance on ::class meta-constant (only available in PHP 5.5+)

This commit is contained in:
Marco Pivetta 2016-06-06 01:48:32 +02:00
parent 224ac9725e
commit 9a393ccba7
2 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,8 @@ namespace Doctrine\Tests\Models\GeoNames;
*/ */
class Country class Country
{ {
const CLASSNAME = __CLASS__;
/** /**
* @Id * @Id
* @Column(type="string", length=2) * @Column(type="string", length=2)

View File

@ -339,7 +339,7 @@ class UnitOfWorkTest extends \Doctrine\Tests\OrmTestCase
$this->_unitOfWork->persist($entity2); $this->_unitOfWork->persist($entity2);
$this->assertTrue($this->_unitOfWork->isInIdentityMap($entity2)); $this->assertTrue($this->_unitOfWork->isInIdentityMap($entity2));
$this->_unitOfWork->clear(Country::class); $this->_unitOfWork->clear(Country::CLASSNAME);
$this->assertTrue($this->_unitOfWork->isInIdentityMap($entity1)); $this->assertTrue($this->_unitOfWork->isInIdentityMap($entity1));
$this->assertFalse($this->_unitOfWork->isInIdentityMap($entity2)); $this->assertFalse($this->_unitOfWork->isInIdentityMap($entity2));
$this->assertTrue($this->_unitOfWork->isScheduledForInsert($entity1)); $this->assertTrue($this->_unitOfWork->isScheduledForInsert($entity1));