diff vendor/phpunit/phpunit-mock-objects/src/Generator.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents c2387f117808
children
line wrap: on
line diff
--- a/vendor/phpunit/phpunit-mock-objects/src/Generator.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/phpunit/phpunit-mock-objects/src/Generator.php	Thu Feb 28 13:21:36 2019 +0000
@@ -1119,6 +1119,9 @@
 
                         if ($value === null) {
                             $value = \var_export($parameter->getDefaultValue(), true);
+                        } elseif (!\defined($value)) {
+                            $rootValue = \preg_replace('/^.*\\\\/', '', $value);
+                            $value = \defined($rootValue) ? $rootValue : $value;
                         }
 
                         $default = ' = ' . $value;