Merge branch '4.3' into 4.4
* 4.3: [Process] fix typo in tests
This commit is contained in:
commit
86ffecb556
@ -96,7 +96,7 @@ class DeprecationErrorHandler
|
|||||||
{
|
{
|
||||||
$deprecations = [];
|
$deprecations = [];
|
||||||
$previousErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$deprecations, &$previousErrorHandler) {
|
$previousErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$deprecations, &$previousErrorHandler) {
|
||||||
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break')) {
|
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break'))) {
|
||||||
if ($previousErrorHandler) {
|
if ($previousErrorHandler) {
|
||||||
return $previousErrorHandler($type, $msg, $file, $line, $context);
|
return $previousErrorHandler($type, $msg, $file, $line, $context);
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ class DeprecationErrorHandler
|
|||||||
*/
|
*/
|
||||||
public function handleError($type, $msg, $file, $line, $context = [])
|
public function handleError($type, $msg, $file, $line, $context = [])
|
||||||
{
|
{
|
||||||
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break')) || !$this->getConfiguration()->isEnabled()) {
|
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break'))) || !$this->getConfiguration()->isEnabled()) {
|
||||||
return \call_user_func(self::getPhpUnitErrorHandler(), $type, $msg, $file, $line, $context);
|
return \call_user_func(self::getPhpUnitErrorHandler(), $type, $msg, $file, $line, $context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class ProcessTest extends TestCase
|
|||||||
$process = $this->getProcessForCode('sleep(3)');
|
$process = $this->getProcessForCode('sleep(3)');
|
||||||
$process->run();
|
$process->run();
|
||||||
$actualError = error_get_last();
|
$actualError = error_get_last();
|
||||||
$this->assertEquals('Test Error', $actualError['message'], print_r($actualError, true));
|
$this->assertEquals('Test Error', $actualError['message']);
|
||||||
$this->assertEquals(E_USER_NOTICE, $actualError['type']);
|
$this->assertEquals(E_USER_NOTICE, $actualError['type']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user