mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
[ticket/17108] Update composer dependencies and expect trigger error code
PHPBB3-17108
This commit is contained in:
parent
21222adc99
commit
51cdac9100
2 changed files with 335 additions and 348 deletions
648
phpBB/composer.lock
generated
648
phpBB/composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -106,34 +106,17 @@ class phpbb_test_case_helpers
|
|||
|
||||
public function setExpectedTriggerError($errno, $message = '')
|
||||
{
|
||||
$exceptionName = '';
|
||||
switch ($errno)
|
||||
set_error_handler(
|
||||
static function ($errno, $errstr)
|
||||
{
|
||||
case E_NOTICE:
|
||||
case E_STRICT:
|
||||
// The static property was removed from PHPUnit since v.8.3.0
|
||||
if (isset(PHPUnit\Framework\Error\Notice::$enabled))
|
||||
{
|
||||
PHPUnit\Framework\Error\Notice::$enabled = true;
|
||||
}
|
||||
$exceptionName = 'PHPUnit\Framework\Error\Notice';
|
||||
break;
|
||||
restore_error_handler();
|
||||
throw new Exception($errstr, $errno);
|
||||
},
|
||||
E_ALL
|
||||
);
|
||||
|
||||
case E_WARNING:
|
||||
// The static property was removed from PHPUnit since v.8.3.0
|
||||
if (isset(PHPUnit\Framework\Error\Warning::$enabled))
|
||||
{
|
||||
PHPUnit\Framework\Error\Warning::$enabled = true;
|
||||
}
|
||||
$exceptionName = 'PHPUnit\Framework\Error\Warning';
|
||||
break;
|
||||
|
||||
default:
|
||||
$exceptionName = 'PHPUnit\Framework\Error\Error';
|
||||
break;
|
||||
}
|
||||
$this->expectedTriggerError = true;
|
||||
$this->test_case->expectException($exceptionName);
|
||||
$this->test_case->expectException(Exception::class);
|
||||
$this->test_case->expectExceptionCode($errno);
|
||||
if ($message)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue