From 9601e39d34822aa953be21ce718d5b7ff6e3c1b8 Mon Sep 17 00:00:00 2001
From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org>
Date: Fri, 20 Jun 2014 09:39:41 +0100
Subject: [PATCH] Issue #2287139 by alexpott: Fixed Various serialization test
 failures after updating to php 5.4.29.

---
 composer.json                                 |   1 +
 composer.lock                                 |  19 +-
 core/vendor/composer/autoload_classmap.php    |   1 -
 core/vendor/composer/include_paths.php        |   2 +-
 core/vendor/composer/installed.json           | 118 ++++++-------
 .../phpunit/phpunit-mock-objects/README.md    |   4 +-
 .../phpunit-mock-objects/build/travis-ci.xml  |   2 +-
 .../phpunit-mock-objects/composer.json        |   4 +-
 .../phpunit-mock-objects/phpunit.xml.dist     |   2 +-
 .../MockObject/Builder/InvocationMocker.php   |  49 ++----
 .../src/Framework/MockObject/Generator.php    |  26 +--
 .../Matcher/ConsecutiveParameters.php         | 162 ------------------
 .../MockObject/Matcher/Parameters.php         |   6 +-
 .../Matcher/ConsecutiveParametersTest.php     |  32 ----
 .../tests/MockObject/wsdl_class.phpt          |   2 +-
 .../MockObject/wsdl_class_namespace.phpt      |   2 +-
 .../tests/MockObject/wsdl_class_partial.phpt  |   2 +-
 .../tests/MockObjectTest.php                  |   8 +-
 .../AbstractMockTestClass.php                 |   0
 .../{_fixture => _files}/AbstractTrait.php    |   0
 .../{_fixture => _files}/AnInterface.php      |   0
 .../{_fixture => _files}/AnotherInterface.php |   0
 .../tests/{_fixture => _files}/Bar.php        |   0
 .../tests/{_fixture => _files}/Foo.php        |   0
 .../{_fixture => _files}/FunctionCallback.php |   0
 .../{_fixture => _files}/GoogleSearch.wsdl    |   0
 .../InterfaceWithStaticMethod.php             |   0
 .../{_fixture => _files}/MethodCallback.php   |   0
 .../MethodCallbackByReference.php             |   0
 .../tests/{_fixture => _files}/Mockable.php   |   0
 .../PartialMockTestClass.php                  |   0
 .../tests/{_fixture => _files}/SomeClass.php  |   0
 .../StaticMockTestClass.php                   |   0
 .../TraversableMockTestInterface.php          |   0
 .../phpunit-mock-objects/tests/autoload.php   |  29 ++--
 .../phpunit-mock-objects/tests/bootstrap.php  |   2 +-
 36 files changed, 124 insertions(+), 349 deletions(-)
 delete mode 100644 core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php
 delete mode 100644 core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/AbstractMockTestClass.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/AbstractTrait.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/AnInterface.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/AnotherInterface.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/Bar.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/Foo.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/FunctionCallback.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/GoogleSearch.wsdl (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/InterfaceWithStaticMethod.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/MethodCallback.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/MethodCallbackByReference.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/Mockable.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/PartialMockTestClass.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/SomeClass.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/StaticMockTestClass.php (100%)
 rename core/vendor/phpunit/phpunit-mock-objects/tests/{_fixture => _files}/TraversableMockTestInterface.php (100%)

diff --git a/composer.json b/composer.json
index 035602189a79..8a78ac5d706e 100644
--- a/composer.json
+++ b/composer.json
@@ -24,6 +24,7 @@
     "symfony-cmf/routing": "1.1.*@alpha",
     "easyrdf/easyrdf": "0.8.*",
     "phpunit/phpunit": "4.1.*",
+    "phpunit/phpunit-mock-objects": "dev-master#e60bb929c50ae4237aaf680a4f6773f4ee17f0a2",
     "zendframework/zend-feed": "2.2.*"
   },
   "autoload": {
diff --git a/composer.lock b/composer.lock
index 4b007c90ce7b..e99a1b9f2536 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "cca4a51cbd3445ccdba4df24bdd2f49e",
+    "hash": "d89a37ea785ca09523298ff00ade2eca",
     "packages": [
         {
             "name": "doctrine/annotations",
@@ -970,16 +970,16 @@
         },
         {
             "name": "phpunit/phpunit-mock-objects",
-            "version": "2.1.4",
+            "version": "dev-master",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
-                "reference": "1a894a16b6c15fcdc5ef2b110f0e6233952c9b0f"
+                "reference": "e60bb929c50ae4237aaf680a4f6773f4ee17f0a2"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/1a894a16b6c15fcdc5ef2b110f0e6233952c9b0f",
-                "reference": "1a894a16b6c15fcdc5ef2b110f0e6233952c9b0f",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/32f97c9198be565b6051983c70dc8d8e758725f4",
+                "reference": "e60bb929c50ae4237aaf680a4f6773f4ee17f0a2",
                 "shasum": ""
             },
             "require": {
@@ -987,7 +987,7 @@
                 "phpunit/php-text-template": "~1.2"
             },
             "require-dev": {
-                "phpunit/phpunit": "~4.1"
+                "phpunit/phpunit": "4.3.*@dev"
             },
             "suggest": {
                 "ext-soap": "*"
@@ -995,7 +995,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.1.x-dev"
+                    "dev-master": "2.3.x-dev"
                 }
             },
             "autoload": {
@@ -1023,7 +1023,7 @@
                 "mock",
                 "xunit"
             ],
-            "time": "2014-06-07 16:22:57"
+            "time": "2014-06-12 07:22:27"
         },
         {
             "name": "psr/log",
@@ -2405,7 +2405,8 @@
         "doctrine/common": 20,
         "doctrine/annotations": 20,
         "kriswallsmith/assetic": 15,
-        "symfony-cmf/routing": 15
+        "symfony-cmf/routing": 15,
+        "phpunit/phpunit-mock-objects": 20
     },
     "platform": {
         "php": ">=5.4.2"
diff --git a/core/vendor/composer/autoload_classmap.php b/core/vendor/composer/autoload_classmap.php
index fb97a3912e80..87d8298b3472 100644
--- a/core/vendor/composer/autoload_classmap.php
+++ b/core/vendor/composer/autoload_classmap.php
@@ -87,7 +87,6 @@
     'PHPUnit_Framework_MockObject_Matcher' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php',
     'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php',
     'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php',
-    'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php',
     'PHPUnit_Framework_MockObject_Matcher_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php',
     'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php',
     'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php',
diff --git a/core/vendor/composer/include_paths.php b/core/vendor/composer/include_paths.php
index 771d07b204ee..951fdb19ab69 100644
--- a/core/vendor/composer/include_paths.php
+++ b/core/vendor/composer/include_paths.php
@@ -7,11 +7,11 @@
 
 return array(
     $vendorDir . '/phpunit/php-text-template',
-    $vendorDir . '/phpunit/phpunit-mock-objects',
     $vendorDir . '/phpunit/php-timer',
     $vendorDir . '/phpunit/php-token-stream',
     $vendorDir . '/phpunit/php-file-iterator',
     $vendorDir . '/phpunit/php-code-coverage',
     $vendorDir . '/phpunit/phpunit',
     $vendorDir . '/symfony/yaml',
+    $vendorDir . '/phpunit/phpunit-mock-objects',
 );
diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json
index 342fc76c40f8..c49881ac4b81 100644
--- a/core/vendor/composer/installed.json
+++ b/core/vendor/composer/installed.json
@@ -2124,65 +2124,6 @@
             "template"
         ]
     },
-    {
-        "name": "phpunit/phpunit-mock-objects",
-        "version": "2.1.4",
-        "version_normalized": "2.1.4.0",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
-            "reference": "1a894a16b6c15fcdc5ef2b110f0e6233952c9b0f"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/1a894a16b6c15fcdc5ef2b110f0e6233952c9b0f",
-            "reference": "1a894a16b6c15fcdc5ef2b110f0e6233952c9b0f",
-            "shasum": ""
-        },
-        "require": {
-            "php": ">=5.3.3",
-            "phpunit/php-text-template": "~1.2"
-        },
-        "require-dev": {
-            "phpunit/phpunit": "~4.1"
-        },
-        "suggest": {
-            "ext-soap": "*"
-        },
-        "time": "2014-06-07 16:22:57",
-        "type": "library",
-        "extra": {
-            "branch-alias": {
-                "dev-master": "2.1.x-dev"
-            }
-        },
-        "installation-source": "dist",
-        "autoload": {
-            "classmap": [
-                "src/"
-            ]
-        },
-        "notification-url": "https://packagist.org/downloads/",
-        "include-path": [
-            ""
-        ],
-        "license": [
-            "BSD-3-Clause"
-        ],
-        "authors": [
-            {
-                "name": "Sebastian Bergmann",
-                "email": "sb@sebastian-bergmann.de",
-                "role": "lead"
-            }
-        ],
-        "description": "Mock Object library for PHPUnit",
-        "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
-        "keywords": [
-            "mock",
-            "xunit"
-        ]
-    },
     {
         "name": "phpunit/php-timer",
         "version": "1.0.5",
@@ -2470,5 +2411,64 @@
             "testing",
             "xunit"
         ]
+    },
+    {
+        "name": "phpunit/phpunit-mock-objects",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
+            "reference": "e60bb929c50ae4237aaf680a4f6773f4ee17f0a2"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/32f97c9198be565b6051983c70dc8d8e758725f4",
+            "reference": "e60bb929c50ae4237aaf680a4f6773f4ee17f0a2",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.3.3",
+            "phpunit/php-text-template": "~1.2"
+        },
+        "require-dev": {
+            "phpunit/phpunit": "4.3.*@dev"
+        },
+        "suggest": {
+            "ext-soap": "*"
+        },
+        "time": "2014-06-12 07:22:27",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.3.x-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "classmap": [
+                "src/"
+            ]
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "include-path": [
+            ""
+        ],
+        "license": [
+            "BSD-3-Clause"
+        ],
+        "authors": [
+            {
+                "name": "Sebastian Bergmann",
+                "email": "sb@sebastian-bergmann.de",
+                "role": "lead"
+            }
+        ],
+        "description": "Mock Object library for PHPUnit",
+        "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
+        "keywords": [
+            "mock",
+            "xunit"
+        ]
     }
 ]
diff --git a/core/vendor/phpunit/phpunit-mock-objects/README.md b/core/vendor/phpunit/phpunit-mock-objects/README.md
index cb855a8a76a4..60dd0f7274d4 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/README.md
+++ b/core/vendor/phpunit/phpunit-mock-objects/README.md
@@ -1,5 +1,5 @@
 [![Latest Stable Version](https://poser.pugx.org/phpunit/phpunit-mock-objects/v/stable.png)](https://packagist.org/packages/phpunit/phpunit-mock-objects)
-[![Build Status](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects.png?branch=master)](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects)
+[![Build Status](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects.png?branch=2.0)](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects)
 
 # PHPUnit_MockObject
 
@@ -15,7 +15,7 @@ To add PHPUnit_MockObject as a local, per-project dependency to your project, si
 
     {
         "require": {
-            "phpunit/phpunit-mock-objects": "2.1.*"
+            "phpunit/phpunit-mock-objects": "2.0.*"
         }
     }
 
diff --git a/core/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml b/core/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml
index f2b2216a82ff..92b0c1685c7b 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml
+++ b/core/vendor/phpunit/phpunit-mock-objects/build/travis-ci.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
+         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.0/phpunit.xsd"
          bootstrap="../tests/bootstrap.php"
          backupGlobals="false"
          verbose="true">
diff --git a/core/vendor/phpunit/phpunit-mock-objects/composer.json b/core/vendor/phpunit/phpunit-mock-objects/composer.json
index 46fda2b5db25..2dd28d65bcd4 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/composer.json
+++ b/core/vendor/phpunit/phpunit-mock-objects/composer.json
@@ -24,7 +24,7 @@
         "phpunit/php-text-template": "~1.2"
     },
     "require-dev": {
-        "phpunit/phpunit": "~4.1"
+        "phpunit/phpunit": ">=4.0.0,<4.1.0"
     },
     "suggest": {
         "ext-soap": "*"
@@ -36,7 +36,7 @@
     },
     "extra": {
         "branch-alias": {
-            "dev-master": "2.1.x-dev"
+            "dev-master": "2.0.x-dev"
         }
     },
     "include-path": [
diff --git a/core/vendor/phpunit/phpunit-mock-objects/phpunit.xml.dist b/core/vendor/phpunit/phpunit-mock-objects/phpunit.xml.dist
index 84db1114592b..170ba3277f3d 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/phpunit.xml.dist
+++ b/core/vendor/phpunit/phpunit-mock-objects/phpunit.xml.dist
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
+         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.0/phpunit.xsd"
          bootstrap="tests/bootstrap.php"
          backupGlobals="false"
          verbose="true">
diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php
index 9b83c1734c53..3bab645e5340 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php
+++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php
@@ -212,12 +212,13 @@ public function after($id)
     }
 
     /**
-     * Validate that a parameters matcher can be defined, throw exceptions otherwise.
-     *
-     * @throws PHPUnit_Framework_Exception
+     * @param  mixed                                                 $argument, ...
+     * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
      */
-    private function canDefineParameters()
+    public function with()
     {
+        $args = func_get_args();
+
         if ($this->matcher->methodNameMatcher === NULL) {
             throw new PHPUnit_Framework_Exception(
               'Method name matcher is not defined, cannot define parameter ' .
@@ -230,45 +231,29 @@ private function canDefineParameters()
               'Parameter matcher is already defined, cannot redefine'
             );
         }
-    }
-
-    /**
-     * @param  mixed                                                 $argument, ...
-     * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
-     */
-    public function with()
-    {
-        $args = func_get_args();
-
-        $this->canDefineParameters();
 
         $this->matcher->parametersMatcher = new PHPUnit_Framework_MockObject_Matcher_Parameters($args);
 
         return $this;
     }
 
-    /**
-     * @param  mixed ...$argument
-     * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
-     */
-    public function withConsecutive() {
-
-        $args = func_get_args();
-
-        $this->canDefineParameters();
-
-        $this->matcher->parametersMatcher =
-          new PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters($args);
-
-        return $this;
-    }
-
     /**
      * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
      */
     public function withAnyParameters()
     {
-        $this->canDefineParameters();
+        if ($this->matcher->methodNameMatcher === NULL) {
+            throw new PHPUnit_Framework_Exception(
+              'Method name matcher is not defined, cannot define parameter ' .
+              'matcher without one'
+            );
+        }
+
+        if ($this->matcher->parametersMatcher !== NULL) {
+            throw new PHPUnit_Framework_Exception(
+              'Parameter matcher is already defined, cannot redefine'
+            );
+        }
 
         $this->matcher->parametersMatcher = new PHPUnit_Framework_MockObject_Matcher_AnyParameters;
 
diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php
index a24171ad72db..7e2983ca9be4 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php
+++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php
@@ -274,15 +274,13 @@ protected function getObject($code, $className, $type = '', $callOriginalConstru
             $class      = new ReflectionClass($className);
             $isInternal = $this->isInternalClass($class);
 
-            if ($isInternal && !$this->unserializeHackIsSupported()) {
-                throw new PHPUnit_Framework_MockObject_RuntimeException(
-                    'Internal classes cannot be mocked without invoking their constructor in PHP ' . PHP_VERSION
-                );
-            }
-
             if ($isInternal || !$hasNewInstanceWithoutConstructor) {
                 $object = unserialize(
-                    sprintf('O:%d:"%s":0:{}', strlen($className), $className)
+                    sprintf('%s:%d:"%s":0:{}',
+                        (version_compare(PHP_VERSION, '5.4', '>') && $class->implementsInterface("Serializable") ? "C" : "O"),
+                        strlen($className),
+                        $className
+                    )
                 );
             } else {
                 $object = $class->newInstanceWithoutConstructor();
@@ -1097,18 +1095,4 @@ private function isInternalClass(ReflectionClass $class)
 
         return false;
     }
-
-    /**
-     * @return boolean
-     * @since  Method available since Release 2.0.9
-     */
-    private function unserializeHackIsSupported()
-    {
-        if (PHP_VERSION == '5.4.29' || PHP_VERSION == '5.5.13' ||
-            version_compare(PHP_VERSION, '5.6.0', '>=')) {
-            return FALSE;
-        }
-
-        return TRUE;
-    }
 }
diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php
deleted file mode 100644
index 7f17225a398a..000000000000
--- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php
+++ /dev/null
@@ -1,162 +0,0 @@
-<?php
-/**
- * PHPUnit
- *
- * Copyright (c) 2010-2014, Sebastian Bergmann <sebastian@phpunit.de>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *   * Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *   * Neither the name of Sebastian Bergmann nor the names of his
- *     contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @package    PHPUnit_MockObject
- * @author     Sebastian Bergmann <sebastian@phpunit.de>
- * @copyright  2010-2014 Sebastian Bergmann <sebastian@phpunit.de>
- * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 3-Clause License
- * @link       http://github.com/sebastianbergmann/phpunit-mock-objects
- */
-
-/**
- * Invocation matcher which looks for sets of specific parameters in the invocations.
- *
- * Checks the parameters of the incoming invocations, the parameter list is
- * checked against the defined constraints in $parameters. If the constraint
- * is met it will return true in matches().
- *
- * It takes a list of match groups and and increases a call index after each invocation.
- * So the first invocation uses the first group of constraints, the second the next and so on.
- *
- * @package    PHPUnit_MockObject
- * @author     Sebastian Bergmann <sebastian@phpunit.de>
- * @copyright  2010-2014 Sebastian Bergmann <sebastian@phpunit.de>
- * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 3-Clause License
- * @version    Release: @package_version@
- * @link       http://github.com/sebastianbergmann/phpunit-mock-objects
- */
-class PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters
-  extends PHPUnit_Framework_MockObject_Matcher_StatelessInvocation
-{
-
-  /**
-   * @var array
-   */
-  private $_parameterGroups = array();
-
-  /**
-   * @var array
-   */
-  private $_invocations = array();
-
-  /**
-   * @param array $parameterGroups
-   */
-  public function __construct(array $parameterGroups)
-  {
-      foreach ($parameterGroups as $index => $parameters) {
-          foreach ($parameters as $parameter) {
-              if (!($parameter instanceof \PHPUnit_Framework_Constraint))
-              {
-                  $parameter = new \PHPUnit_Framework_Constraint_IsEqual($parameter);
-              }
-              $this->_parameterGroups[$index][] = $parameter;
-          }
-      }
-  }
-
-    /**
-     * @return string
-     */
-    public function toString()
-    {
-        $text = 'with consecutive parameters';
-
-        return $text;
-    }
-
-  /**
-   * @param PHPUnit_Framework_MockObject_Invocation $invocation
-   * @return bool
-   */
-  public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
-  {
-      $this->_invocations[] = $invocation;
-      $callIndex = count($this->_invocations) - 1;
-      $this->verifyInvocation($invocation, $callIndex);
-      return FALSE;
-  }
-
-  public function verify()
-  {
-      foreach ($this->_invocations as $callIndex => $invocation) {
-        $this->verifyInvocation($invocation, $callIndex);
-      }
-  }
-
-  /**
-   * Verify a single invocation
-   *
-   * @param PHPUnit_Framework_MockObject_Invocation $invocation
-   * @param int $callIndex
-   * @throws PHPUnit_Framework_ExpectationFailedException
-   */
-  private function verifyInvocation(PHPUnit_Framework_MockObject_Invocation $invocation, $callIndex)
-  {
-
-      if (isset($this->_parameterGroups[$callIndex])) {
-          $parameters = $this->_parameterGroups[$callIndex];
-      }
-
-      if ($invocation === NULL) {
-          throw new PHPUnit_Framework_ExpectationFailedException(
-            'Mocked method does not exist.'
-          );
-      }
-
-      if (count($invocation->parameters) < count($parameters)) {
-          throw new PHPUnit_Framework_ExpectationFailedException(
-              sprintf(
-                'Parameter count for invocation %s is too low.',
-                $invocation->toString()
-              )
-          );
-      }
-
-      foreach ($parameters as $i => $parameter) {
-          $parameter->evaluate(
-              $invocation->parameters[$i],
-              sprintf(
-                'Parameter %s for invocation #%d %s does not match expected ' .
-                'value.',
-                $i,
-                $callIndex,
-                $invocation->toString()
-              )
-          );
-      }
-  }
-}
diff --git a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php
index 90abaa59c8ad..1bb79f2f44ec 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php
+++ b/core/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php
@@ -110,7 +110,9 @@ public function toString()
     public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
     {
         $this->invocation = $invocation;
-        return $this->verify();
+        $this->verify();
+
+        return count($invocation->parameters) < count($this->parameters);
     }
 
     /**
@@ -154,7 +156,5 @@ public function verify()
               )
             );
         }
-
-        return true;
     }
 }
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php
deleted file mode 100644
index d12ba5b969b8..000000000000
--- a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-class Framework_MockObject_Matcher_ConsecutiveParametersTest extends PHPUnit_Framework_TestCase
-{
-    public function testIntegration()
-    {
-        $mock = $this->getMock('stdClass', array('foo'));
-        $mock
-            ->expects($this->any())
-            ->method('foo')
-            ->withConsecutive(
-                array('bar'),
-                array(21, 42)
-            );
-        $mock->foo('bar');
-        $mock->foo(21, 42);
-    }
-
-    public function testIntegrationExpectingException()
-    {
-        $mock = $this->getMock('stdClass', array('foo'));
-        $mock
-            ->expects($this->any())
-            ->method('foo')
-            ->withConsecutive(
-                array('bar'),
-                array(21, 42)
-            );
-        $mock->foo('bar');
-        $this->setExpectedException('PHPUnit_Framework_ExpectationFailedException');
-        $mock->foo('invalid');
-    }
-}
\ No newline at end of file
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt
index 06b255f1e633..6b2d0a34a785 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt
+++ b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt
@@ -11,7 +11,7 @@ require __DIR__ . '/../../vendor/autoload.php';
 $generator = new PHPUnit_Framework_MockObject_Generator;
 
 print $generator->generateClassFromWsdl(
-  dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl',
+  dirname(dirname(__FILE__)) . '/_files/GoogleSearch.wsdl',
   'GoogleSearch'
 );
 ?>
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt
index 9460e6b440ed..dc819cf08449 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt
+++ b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt
@@ -11,7 +11,7 @@ require __DIR__ . '/../../vendor/autoload.php';
 $generator = new PHPUnit_Framework_MockObject_Generator;
 
 print $generator->generateClassFromWsdl(
-  dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl',
+  dirname(dirname(__FILE__)) . '/_files/GoogleSearch.wsdl',
   'My\\Space\\GoogleSearch'
 );
 ?>
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt
index fc814bd14696..879fbd360cde 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt
+++ b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt
@@ -11,7 +11,7 @@ require __DIR__ . '/../../vendor/autoload.php';
 $generator = new PHPUnit_Framework_MockObject_Generator;
 
 print $generator->generateClassFromWsdl(
-  dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl',
+  dirname(dirname(__FILE__)) . '/_files/GoogleSearch.wsdl',
   'GoogleSearch',
   array('doGoogleSearch')
 );
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php
index ec195f125a79..2b37338d26c7 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php
+++ b/core/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php
@@ -730,7 +730,7 @@ public function testMockArgumentsPassedByReference4()
      */
     public function testCreateMockFromWsdl()
     {
-        $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl', 'WsdlMock');
+        $mock = $this->getMockFromWsdl(__DIR__ . '/_files/GoogleSearch.wsdl', 'WsdlMock');
         $this->assertStringStartsWith(
             'Mock_WsdlMock_',
             get_class($mock)
@@ -742,7 +742,7 @@ public function testCreateMockFromWsdl()
      */
     public function testCreateNamespacedMockFromWsdl()
     {
-        $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl', 'My\\Space\\WsdlMock');
+        $mock = $this->getMockFromWsdl(__DIR__ . '/_files/GoogleSearch.wsdl', 'My\\Space\\WsdlMock');
         $this->assertStringStartsWith(
             'Mock_WsdlMock_',
             get_class($mock)
@@ -754,8 +754,8 @@ public function testCreateNamespacedMockFromWsdl()
      */
     public function testCreateTwoMocksOfOneWsdlFile()
     {
-        $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl');
-        $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/GoogleSearch.wsdl');
+        $mock = $this->getMockFromWsdl(__DIR__ . '/_files/GoogleSearch.wsdl');
+        $mock = $this->getMockFromWsdl(__DIR__ . '/_files/GoogleSearch.wsdl');
     }
 
     /**
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AbstractMockTestClass.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/AbstractMockTestClass.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AbstractMockTestClass.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/AbstractMockTestClass.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AbstractTrait.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/AbstractTrait.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AbstractTrait.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/AbstractTrait.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AnInterface.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/AnInterface.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AnInterface.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/AnInterface.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AnotherInterface.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/AnotherInterface.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AnotherInterface.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/AnotherInterface.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Bar.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/Bar.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Bar.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/Bar.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Foo.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/Foo.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Foo.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/Foo.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/FunctionCallback.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/FunctionCallback.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/GoogleSearch.wsdl b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/GoogleSearch.wsdl
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/GoogleSearch.wsdl
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/GoogleSearch.wsdl
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/InterfaceWithStaticMethod.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/InterfaceWithStaticMethod.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/InterfaceWithStaticMethod.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/InterfaceWithStaticMethod.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallback.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/MethodCallback.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallback.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/MethodCallback.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallbackByReference.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/MethodCallbackByReference.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallbackByReference.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/MethodCallbackByReference.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Mockable.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/Mockable.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Mockable.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/Mockable.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/PartialMockTestClass.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/PartialMockTestClass.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/PartialMockTestClass.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/PartialMockTestClass.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SomeClass.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/SomeClass.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SomeClass.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/SomeClass.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/StaticMockTestClass.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/StaticMockTestClass.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/StaticMockTestClass.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/StaticMockTestClass.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/TraversableMockTestInterface.php b/core/vendor/phpunit/phpunit-mock-objects/tests/_files/TraversableMockTestInterface.php
similarity index 100%
rename from core/vendor/phpunit/phpunit-mock-objects/tests/_fixture/TraversableMockTestInterface.php
rename to core/vendor/phpunit/phpunit-mock-objects/tests/_files/TraversableMockTestInterface.php
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/autoload.php b/core/vendor/phpunit/phpunit-mock-objects/tests/autoload.php
index cf63f63082d7..7d4f0b654851 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/tests/autoload.php
+++ b/core/vendor/phpunit/phpunit-mock-objects/tests/autoload.php
@@ -7,29 +7,28 @@ function($class) {
         static $classes = null;
         if ($classes === null) {
             $classes = array(
-                'abstractmocktestclass' => '/_fixture/AbstractMockTestClass.php',
-                'abstracttrait' => '/_fixture/AbstractTrait.php',
-                'aninterface' => '/_fixture/AnInterface.php',
-                'anotherinterface' => '/_fixture/AnotherInterface.php',
-                'bar' => '/_fixture/Bar.php',
+                'abstractmocktestclass' => '/_files/AbstractMockTestClass.php',
+                'abstracttrait' => '/_files/AbstractTrait.php',
+                'aninterface' => '/_files/AnInterface.php',
+                'anotherinterface' => '/_files/AnotherInterface.php',
+                'bar' => '/_files/Bar.php',
                 'classthatimplementsserializable' => '/_files/ClassThatImplementsSerializable.php',
                 'classwithstaticmethod' => '/_files/ClassWithStaticMethod.php',
-                'foo' => '/_fixture/Foo.php',
+                'foo' => '/_files/Foo.php',
                 'framework_mockbuildertest' => '/MockBuilderTest.php',
                 'framework_mockobject_generatortest' => '/GeneratorTest.php',
                 'framework_mockobject_invocation_objecttest' => '/MockObject/Invocation/ObjectTest.php',
                 'framework_mockobject_invocation_statictest' => '/MockObject/Invocation/StaticTest.php',
-                'framework_mockobject_matcher_consecutiveparameterstest' => '/MockObject/Matcher/ConsecutiveParametersTest.php',
                 'framework_mockobjecttest' => '/MockObjectTest.php',
                 'framework_proxyobjecttest' => '/ProxyObjectTest.php',
-                'interfacewithstaticmethod' => '/_fixture/InterfaceWithStaticMethod.php',
-                'methodcallback' => '/_fixture/MethodCallback.php',
-                'methodcallbackbyreference' => '/_fixture/MethodCallbackByReference.php',
-                'mockable' => '/_fixture/Mockable.php',
-                'partialmocktestclass' => '/_fixture/PartialMockTestClass.php',
-                'someclass' => '/_fixture/SomeClass.php',
-                'staticmocktestclass' => '/_fixture/StaticMockTestClass.php',
-                'traversablemocktestinterface' => '/_fixture/TraversableMockTestInterface.php'
+                'interfacewithstaticmethod' => '/_files/InterfaceWithStaticMethod.php',
+                'methodcallback' => '/_files/MethodCallback.php',
+                'methodcallbackbyreference' => '/_files/MethodCallbackByReference.php',
+                'mockable' => '/_files/Mockable.php',
+                'partialmocktestclass' => '/_files/PartialMockTestClass.php',
+                'someclass' => '/_files/SomeClass.php',
+                'staticmocktestclass' => '/_files/StaticMockTestClass.php',
+                'traversablemocktestinterface' => '/_files/TraversableMockTestInterface.php'
             );
         }
         $cn = strtolower($class);
diff --git a/core/vendor/phpunit/phpunit-mock-objects/tests/bootstrap.php b/core/vendor/phpunit/phpunit-mock-objects/tests/bootstrap.php
index 39a9c12aa0c2..72b0a5a9dc0c 100644
--- a/core/vendor/phpunit/phpunit-mock-objects/tests/bootstrap.php
+++ b/core/vendor/phpunit/phpunit-mock-objects/tests/bootstrap.php
@@ -1,5 +1,5 @@
 <?php
 require __DIR__ . '/autoload.php';
-require __DIR__ . '/_fixture/FunctionCallback.php';
+require __DIR__ . '/_files/FunctionCallback.php';
 require __DIR__ . '/../vendor/autoload.php';
 
-- 
GitLab