test: Remove expectError() and expectException()

These are incompatible signature with the PHPUnit 9 method of the same name.
This commit is contained in:
Koji Tanaka 2022-12-28 16:34:22 +09:00 committed by Kamil Wylegala
parent a95654de88
commit a1ed2f91b3

View file

@ -606,33 +606,6 @@ abstract class CakeTestCase extends \PHPUnit\Framework\TestCase {
protected function assertNoErrors() {
}
/**
* Compatibility wrapper function for setExpectedException
*
* @param mixed $expected the name of the Exception or error
* @param string $message the text to display if the assertion is not correct
* @deprecated 3.0.0 This is a compatibility wrapper for 1.x. It will be removed in 3.0
* @return void
*/
protected function expectError($expected = false, $message = '') {
if (!$expected) {
$expected = 'Exception';
}
$this->setExpectedException($expected, $message);
}
/**
* Compatibility wrapper function for setExpectedException
*
* @param mixed $name The name of the expected Exception.
* @param string $message the text to display if the assertion is not correct
* @deprecated 3.0.0 This is a compatibility wrapper for 1.x. It will be removed in 3.0.
* @return void
*/
public function expectException($name = 'Exception', $message = '') {
$this->setExpectedException($name, $message);
}
/**
* Compatibility wrapper function for assertSame
*