Merge branch '4.3' into 4.4

* 4.3:
  [Process] fix typo in tests
This commit is contained in:
Nicolas Grekas 2019-09-19 19:12:09 +02:00
commit 86ffecb556
2 changed files with 3 additions and 3 deletions

View File

@ -96,7 +96,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);
}
@ -119,7 +119,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);
}

View File

@ -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']);
}