Fixed failing tests in PHPUnit 3.6.2 (expecting \Exception was deprecated)
This commit is contained in:
parent
d532de9da3
commit
2ddfc6af5a
@ -73,7 +73,14 @@ class OneToManyUnidirectionalAssociationTest extends \Doctrine\Tests\OrmFunction
|
|||||||
$this->_em->persist($routeA);
|
$this->_em->persist($routeA);
|
||||||
$this->_em->persist($routeB);
|
$this->_em->persist($routeB);
|
||||||
|
|
||||||
$this->setExpectedException('Exception'); // depends on the underyling Database Driver
|
$exceptionThrown = false;
|
||||||
$this->_em->flush(); // Exception
|
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', 'Bar');
|
||||||
$this->article1->addTranslation('en', 'Baz');
|
$this->article1->addTranslation('en', 'Baz');
|
||||||
|
|
||||||
$this->setExpectedException('Exception');
|
$exceptionThrown = false;
|
||||||
$this->_em->flush();
|
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