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 = '')
|
public function setExpectedTriggerError($errno, $message = '')
|
||||||
{
|
{
|
||||||
$exceptionName = '';
|
set_error_handler(
|
||||||
switch ($errno)
|
static function ($errno, $errstr)
|
||||||
{
|
{
|
||||||
case E_NOTICE:
|
restore_error_handler();
|
||||||
case E_STRICT:
|
throw new Exception($errstr, $errno);
|
||||||
// The static property was removed from PHPUnit since v.8.3.0
|
},
|
||||||
if (isset(PHPUnit\Framework\Error\Notice::$enabled))
|
E_ALL
|
||||||
{
|
);
|
||||||
PHPUnit\Framework\Error\Notice::$enabled = true;
|
|
||||||
}
|
|
||||||
$exceptionName = 'PHPUnit\Framework\Error\Notice';
|
|
||||||
break;
|
|
||||||
|
|
||||||
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->expectedTriggerError = true;
|
||||||
$this->test_case->expectException($exceptionName);
|
$this->test_case->expectException(Exception::class);
|
||||||
$this->test_case->expectExceptionCode($errno);
|
$this->test_case->expectExceptionCode($errno);
|
||||||
if ($message)
|
if ($message)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue