From a1ed2f91b357e0d224c5bb81e4632af83d85595d Mon Sep 17 00:00:00 2001 From: Koji Tanaka Date: Wed, 28 Dec 2022 16:34:22 +0900 Subject: [PATCH] test: Remove expectError() and expectException() These are incompatible signature with the PHPUnit 9 method of the same name. --- lib/Cake/TestSuite/CakeTestCase.php | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/lib/Cake/TestSuite/CakeTestCase.php b/lib/Cake/TestSuite/CakeTestCase.php index ba51d9f34..c7d54fc9b 100644 --- a/lib/Cake/TestSuite/CakeTestCase.php +++ b/lib/Cake/TestSuite/CakeTestCase.php @@ -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 *