From 1cd03625a57dba1f7a2f11070d145f6926b6f33f Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Sun, 18 Jan 2015 00:59:58 +0100 Subject: [PATCH] #1228 DDC-3490 - fixed exception catching in `BasicFunctionalTest` logic --- .../Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php b/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php index be290acb3..29f8fab85 100644 --- a/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php @@ -1288,9 +1288,14 @@ class BasicFunctionalTest extends \Doctrine\Tests\OrmFunctionalTestCase $user->status = 'developer'; $user->address = $user; + $this->setExpectedException( + 'Doctrine\ORM\ORMInvalidArgumentException', + 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field ' + . '"Doctrine\Tests\Models\CMS\CmsUser#$address", got "Doctrine\Tests\Models\CMS\CmsUser" instead.' + ); + $this->_em->persist($user); - $this->setExpectedException("Doctrine\ORM\ORMException", "Found entity of type Doctrine\Tests\Models\CMS\CmsUser on association Doctrine\Tests\Models\CMS\CmsUser#address, but expecting Doctrine\Tests\Models\CMS\CmsAddress"); $this->_em->flush(); } }