From 6ab27993fc08810689bc11ac50ac25b853943951 Mon Sep 17 00:00:00 2001 From: Alexander Kurilo Date: Mon, 29 Aug 2016 22:29:41 +0300 Subject: [PATCH] Use ::class const instead of FQCN string (#5762) --- .../Tests/ORM/Functional/Ticket/GH5762Test.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5762Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5762Test.php index ff3dac7e6..a602921de 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5762Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5762Test.php @@ -3,11 +3,13 @@ namespace Doctrine\Tests\ORM\Functional\Ticket; use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\ORM\PersistentCollection; +use Doctrine\Tests\OrmFunctionalTestCase; /** * @group GH-5762 */ -class GH5762Test extends \Doctrine\Tests\OrmFunctionalTestCase +class GH5762Test extends OrmFunctionalTestCase { protected function setup() @@ -25,10 +27,10 @@ class GH5762Test extends \Doctrine\Tests\OrmFunctionalTestCase { $result = $this->fetchData(); - $this->assertInstanceOf(__NAMESPACE__ . '\GH5762Driver', $result); - $this->assertInstanceOf('Doctrine\ORM\PersistentCollection', $result->driverRides); - $this->assertInstanceOf(__NAMESPACE__ . '\GH5762DriverRide', $result->driverRides->get(0)); - $this->assertInstanceOf(__NAMESPACE__ . '\GH5762Car', $result->driverRides->get(0)->car); + $this->assertInstanceOf(GH5762Driver::class, $result); + $this->assertInstanceOf(PersistentCollection::class, $result->driverRides); + $this->assertInstanceOf(GH5762DriverRide::class, $result->driverRides->get(0)); + $this->assertInstanceOf(GH5762Car::class, $result->driverRides->get(0)->car); $cars = array(); foreach ($result->driverRides as $ride) { @@ -49,7 +51,7 @@ class GH5762Test extends \Doctrine\Tests\OrmFunctionalTestCase $qb = $this->_em->createQueryBuilder(); $qb->select('d, dr, c') - ->from(__NAMESPACE__ . '\GH5762Driver', 'd') + ->from(GH5762Driver::class, 'd') ->leftJoin('d.driverRides', 'dr') ->leftJoin('dr.car', 'c') ->where('d.id = 1');