Merge pull request #186 from asm89/fix-tests-phpunit-3.6
Fixed failing tests in PHPUnit 3.6.2 (expecting \Exception was deprecated)
This commit is contained in:
commit
d9ec0a59ec
@ -73,7 +73,14 @@ class OneToManyUnidirectionalAssociationTest extends \Doctrine\Tests\OrmFunction
|
||||
$this->_em->persist($routeA);
|
||||
$this->_em->persist($routeB);
|
||||
|
||||
$this->setExpectedException('Exception'); // depends on the underyling Database Driver
|
||||
$this->_em->flush(); // Exception
|
||||
$exceptionThrown = false;
|
||||
try {
|
||||
// exception depending on the underyling Database Driver
|
||||
$this->_em->flush();
|
||||
} catch(\Exception $e) {
|
||||
$exceptionThrown = true;
|
||||
}
|
||||
|
||||
$this->assertTrue($exceptionThrown, "The underlying database driver throws an exception.");
|
||||
}
|
||||
}
|
@ -209,8 +209,15 @@ class DDC117Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->article1->addTranslation('en', 'Bar');
|
||||
$this->article1->addTranslation('en', 'Baz');
|
||||
|
||||
$this->setExpectedException('Exception');
|
||||
$exceptionThrown = false;
|
||||
try {
|
||||
// exception depending on the underyling Database Driver
|
||||
$this->_em->flush();
|
||||
} catch(\Exception $e) {
|
||||
$exceptionThrown = true;
|
||||
}
|
||||
|
||||
$this->assertTrue($exceptionThrown, "The underlying database driver throws an exception.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user