From 17892bb32782f8901da3b636ca92681ef37b71b6 Mon Sep 17 00:00:00 2001 From: stoccc Date: Fri, 21 Jul 2017 10:47:32 +0200 Subject: [PATCH] added named parameter and LifecycleCallbackCascader::getId() --- .../Tests/ORM/Functional/LifecycleCallbackTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php b/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php index 83836c662..914acbecf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php @@ -296,12 +296,12 @@ FROM LEFT JOIN entA.entities AS entB WHERE - entA.id = %s + entA.id = :entA_id DQL; $fetchedA = $this ->_em - ->createQuery(sprintf($dql, $entA->getId())) + ->createQuery($dql)->setParameter('entA_id', $entA->getId()) ->getOneOrNullResult(); $this->assertTrue($fetchedA->postLoadCallbackInvoked); @@ -496,6 +496,10 @@ class LifecycleCallbackCascader $this->postLoadCallbackInvoked = true; $this->postLoadEntitiesCount = count($this->entities); } + + public function getId() { + return $this->id; + } } /** @MappedSuperclass @HasLifecycleCallbacks */