Merge branch '3.4' into 4.3
* 3.4: [Process] fix typo in tests
This commit is contained in:
commit
a23c3ef42a
@ -98,7 +98,7 @@ class DeprecationErrorHandler
|
||||
{
|
||||
$deprecations = [];
|
||||
$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) {
|
||||
return $previousErrorHandler($type, $msg, $file, $line, $context);
|
||||
}
|
||||
@ -121,7 +121,7 @@ class DeprecationErrorHandler
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ class ProcessTest extends TestCase
|
||||
$process = $this->getProcessForCode('sleep(3)');
|
||||
$process->run();
|
||||
$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']);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user