1
0
mirror of synced 2025-01-19 06:51:40 +03:00

#1228 DDC-3490 - fixed exception catching in BasicFunctionalTest logic

This commit is contained in:
Marco Pivetta 2015-01-18 00:59:58 +01:00
parent 66479334d4
commit 1cd03625a5

View File

@ -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();
}
}