#1228 DDC-3490 - fixed exception catching in BasicFunctionalTest
logic
This commit is contained in:
parent
66479334d4
commit
1cd03625a5
1 changed files with 6 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue