Commit 03da2949 authored by webchick's avatar webchick

Issue #2400407 by DuaelFr: Ensure vendor phpunit/phpunit-mock-objects is on latest stable release

parent 73f7d115
......@@ -1489,22 +1489,23 @@
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "2.3.1",
"version": "2.3.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "74ffb87f527f24616f72460e54b595f508dccb5c"
"reference": "5e2645ad49d196e020b85598d7c97e482725786a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/74ffb87f527f24616f72460e54b595f508dccb5c",
"reference": "74ffb87f527f24616f72460e54b595f508dccb5c",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5e2645ad49d196e020b85598d7c97e482725786a",
"reference": "5e2645ad49d196e020b85598d7c97e482725786a",
"shasum": ""
},
"require": {
"doctrine/instantiator": "~1.0,>=1.0.2",
"doctrine/instantiator": "^1.0.2",
"php": ">=5.3.3",
"phpunit/php-text-template": "~1.2"
"phpunit/php-text-template": "~1.2",
"sebastian/exporter": "~1.2"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
......@@ -1540,7 +1541,7 @@
"mock",
"xunit"
],
"time": "2015-04-02 05:36:41"
"time": "2015-08-19 09:14:08"
},
{
"name": "psr/http-message",
......
......@@ -715,63 +715,6 @@
}
]
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "2.3.1",
"version_normalized": "2.3.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "74ffb87f527f24616f72460e54b595f508dccb5c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/74ffb87f527f24616f72460e54b595f508dccb5c",
"reference": "74ffb87f527f24616f72460e54b595f508dccb5c",
"shasum": ""
},
"require": {
"doctrine/instantiator": "~1.0,>=1.0.2",
"php": ">=5.3.3",
"phpunit/php-text-template": "~1.2"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
},
"suggest": {
"ext-soap": "*"
},
"time": "2015-04-02 05:36:41",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"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": "mikey179/vfsStream",
"version": "v1.5.0",
......@@ -3483,5 +3426,63 @@
"keywords": [
"tokenizer"
]
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "2.3.7",
"version_normalized": "2.3.7.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "5e2645ad49d196e020b85598d7c97e482725786a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5e2645ad49d196e020b85598d7c97e482725786a",
"reference": "5e2645ad49d196e020b85598d7c97e482725786a",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": ">=5.3.3",
"phpunit/php-text-template": "~1.2",
"sebastian/exporter": "~1.2"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
},
"suggest": {
"ext-soap": "*"
},
"time": "2015-08-19 09:14:08",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"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"
]
}
]
[![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://img.shields.io/travis/sebastianbergmann/phpunit-mock-objects/2.3.svg?style=flat-square)](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects)
[![Latest Stable Version](https://img.shields.io/packagist/v/phpunit/phpunit-mock-objects.svg?style=flat-square)](https://packagist.org/packages/phpunit/phpunit-mock-objects)
# PHPUnit_MockObject
......@@ -11,11 +11,11 @@
## Installation
To add PHPUnit_MockObject as a local, per-project dependency to your project, simply add a dependency on `phpunit/phpunit-mock-objects` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHPUnit_MockObject 2.0:
To add PHPUnit_MockObject as a local, per-project dependency to your project, simply add a dependency on `phpunit/phpunit-mock-objects` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHPUnit_MockObject 2.3:
{
"require": {
"phpunit/phpunit-mock-objects": "2.1.*"
"phpunit/phpunit-mock-objects": "2.3.*"
}
}
......@@ -22,7 +22,8 @@
"require": {
"php": ">=5.3.3",
"phpunit/php-text-template": "~1.2",
"doctrine/instantiator": "~1.0,>=1.0.2"
"doctrine/instantiator": "^1.0.2",
"sebastian/exporter": "~1.2"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
......
......@@ -16,13 +16,7 @@
* is recorded using id() and then defined in order using
* PHPUnit_Framework_MockObject_Builder_Match::after().
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Interface available since Release 1.0.0
* @since Interface available since Release 1.0.0
*/
interface PHPUnit_Framework_MockObject_Builder_Identity
{
......
......@@ -16,13 +16,7 @@
* more natural way of reading the expectation. This class should be together
* with the test case PHPUnit_Framework_MockObject_TestCase.
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Class available since Release 1.0.0
* @since Class available since Release 1.0.0
*/
class PHPUnit_Framework_MockObject_Builder_InvocationMocker implements PHPUnit_Framework_MockObject_Builder_MethodNameMatch
{
......@@ -44,7 +38,7 @@ public function __construct(PHPUnit_Framework_MockObject_Stub_MatcherCollection
{
$this->collection = $collection;
$this->matcher = new PHPUnit_Framework_MockObject_Matcher(
$invocationMatcher
$invocationMatcher
);
$this->collection->addMatcher($this->matcher);
......@@ -87,7 +81,7 @@ public function will(PHPUnit_Framework_MockObject_Stub $stub)
public function willReturn($value)
{
$stub = new PHPUnit_Framework_MockObject_Stub_Return(
$value
$value
);
return $this->will($stub);
......@@ -100,7 +94,7 @@ public function willReturn($value)
public function willReturnMap(array $valueMap)
{
$stub = new PHPUnit_Framework_MockObject_Stub_ReturnValueMap(
$valueMap
$valueMap
);
return $this->will($stub);
......@@ -113,7 +107,7 @@ public function willReturnMap(array $valueMap)
public function willReturnArgument($argumentIndex)
{
$stub = new PHPUnit_Framework_MockObject_Stub_ReturnArgument(
$argumentIndex
$argumentIndex
);
return $this->will($stub);
......@@ -126,7 +120,7 @@ public function willReturnArgument($argumentIndex)
public function willReturnCallback($callback)
{
$stub = new PHPUnit_Framework_MockObject_Stub_ReturnCallback(
$callback
$callback
);
return $this->will($stub);
......@@ -184,16 +178,16 @@ public function after($id)
*/
private function canDefineParameters()
{
if ($this->matcher->methodNameMatcher === NULL) {
if ($this->matcher->methodNameMatcher === null) {
throw new PHPUnit_Framework_Exception(
'Method name matcher is not defined, cannot define parameter ' .
' matcher without one'
'Method name matcher is not defined, cannot define parameter ' .
' matcher without one'
);
}
if ($this->matcher->parametersMatcher !== NULL) {
if ($this->matcher->parametersMatcher !== null) {
throw new PHPUnit_Framework_Exception(
'Parameter matcher is already defined, cannot redefine'
'Parameter matcher is already defined, cannot redefine'
);
}
}
......@@ -217,7 +211,8 @@ public function with()
* @param mixed ...$argument
* @return PHPUnit_Framework_MockObject_Builder_InvocationMocker
*/
public function withConsecutive() {
public function withConsecutive()
{
$args = func_get_args();
......@@ -247,9 +242,9 @@ public function withAnyParameters()
*/
public function method($constraint)
{
if ($this->matcher->methodNameMatcher !== NULL) {
if ($this->matcher->methodNameMatcher !== null) {
throw new PHPUnit_Framework_Exception(
'Method name matcher is already defined, cannot redefine'
'Method name matcher is already defined, cannot redefine'
);
}
......
......@@ -11,13 +11,7 @@
/**
* Builder interface for invocation order matches.
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Interface available since Release 1.0.0
* @since Interface available since Release 1.0.0
*/
interface PHPUnit_Framework_MockObject_Builder_Match extends PHPUnit_Framework_MockObject_Builder_Stub
{
......
......@@ -11,13 +11,7 @@
/**
* Builder interface for matcher of method names.
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Interface available since Release 1.0.0
* @since Interface available since Release 1.0.0
*/
interface PHPUnit_Framework_MockObject_Builder_MethodNameMatch extends PHPUnit_Framework_MockObject_Builder_ParametersMatch
{
......
......@@ -13,13 +13,7 @@
*
* This interface relates to PHPUnit_Framework_MockObject_Builder_Identity.
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Interface available since Release 1.0.0
* @since Interface available since Release 1.0.0
*/
interface PHPUnit_Framework_MockObject_Builder_Namespace
{
......
......@@ -11,13 +11,7 @@
/**
* Builder interface for parameter matchers.
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Interface available since Release 1.0.0
* @since Interface available since Release 1.0.0
*/
interface PHPUnit_Framework_MockObject_Builder_ParametersMatch extends PHPUnit_Framework_MockObject_Builder_Match
{
......
......@@ -11,13 +11,7 @@
/**
* Builder interface for stubs which are actions replacing an invocation.
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Interface available since Release 1.0.0
* @since Interface available since Release 1.0.0
*/
interface PHPUnit_Framework_MockObject_Builder_Stub extends PHPUnit_Framework_MockObject_Builder_Identity
{
......
......@@ -9,12 +9,7 @@
*/
/**
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Class available since Release 2.0.6
* @since Class available since Release 2.0.6
*/
class PHPUnit_Framework_MockObject_BadMethodCallException extends BadMethodCallException implements PHPUnit_Framework_MockObject_Exception
{
......
......@@ -11,12 +11,7 @@
/**
* Interface for exceptions used by PHPUnit_MockObject.
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Interface available since Release 2.0.6
* @since Interface available since Release 2.0.6
*/
interface PHPUnit_Framework_MockObject_Exception
{
......
......@@ -9,12 +9,7 @@
*/
/**
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Class available since Release 2.0.6
* @since Class available since Release 2.0.6
*/
class PHPUnit_Framework_MockObject_RuntimeException extends RuntimeException implements PHPUnit_Framework_MockObject_Exception
{
......
......@@ -11,13 +11,7 @@
/**
* Interface for invocations.
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Interface available since Release 1.0.0
* @since Interface available since Release 1.0.0
*/
interface PHPUnit_Framework_MockObject_Invocation
{
......
......@@ -11,13 +11,7 @@
/**
* Represents a non-static invocation.
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Class available since Release 1.0.0
* @since Class available since Release 1.0.0
*/
class PHPUnit_Framework_MockObject_Invocation_Object extends PHPUnit_Framework_MockObject_Invocation_Static
{
......@@ -33,7 +27,7 @@ class PHPUnit_Framework_MockObject_Invocation_Object extends PHPUnit_Framework_M
* @param object $object
* @param object $cloneObjects
*/
public function __construct($className, $methodName, array $parameters, $object, $cloneObjects = FALSE)
public function __construct($className, $methodName, array $parameters, $object, $cloneObjects = false)
{
parent::__construct($className, $methodName, $parameters, $cloneObjects);
$this->object = $object;
......
......@@ -13,13 +13,7 @@
/**
* Represents a static invocation.
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Class available since Release 1.0.0
* @since Class available since Release 1.0.0
*/
class PHPUnit_Framework_MockObject_Invocation_Static implements PHPUnit_Framework_MockObject_Invocation, PHPUnit_Framework_SelfDescribing
{
......@@ -27,12 +21,12 @@ class PHPUnit_Framework_MockObject_Invocation_Static implements PHPUnit_Framewor
* @var array
*/
protected static $uncloneableExtensions = array(
'mysqli' => TRUE,
'SQLite' => TRUE,
'sqlite3' => TRUE,
'tidy' => TRUE,
'xmlwriter' => TRUE,
'xsl' => TRUE
'mysqli' => true,
'SQLite' => true,
'sqlite3' => true,
'tidy' => true,
'xmlwriter' => true,
'xsl' => true
);
/**
......@@ -64,12 +58,12 @@ class PHPUnit_Framework_MockObject_Invocation_Static implements PHPUnit_Framewor
public $parameters;
/**
* @param string $className
* @param string $methodname
* @param array $parameters
* @param boolean $cloneObjects
* @param string $className
* @param string $methodname
* @param array $parameters
* @param bool $cloneObjects
*/
public function __construct($className, $methodName, array $parameters, $cloneObjects = FALSE)
public function __construct($className, $methodName, array $parameters, $cloneObjects = false)
{
$this->className = $className;
$this->methodName = $methodName;
......@@ -94,17 +88,16 @@ public function toString()
$exporter = new Exporter;
return sprintf(
"%s::%s(%s)",
$this->className,
$this->methodName,
join(
', ',
array_map(
array($exporter, 'shortenedExport'),
$this->parameters
'%s::%s(%s)',
$this->className,
$this->methodName,
implode(
', ',
array_map(
array($exporter, 'shortenedExport'),
$this->parameters
)
)
)
);
}
......@@ -114,36 +107,36 @@ public function toString()
*/
protected function cloneObject($original)
{
$cloneable = NULL;
$cloneable = null;
$object = new ReflectionObject($original);
// Check the blacklist before asking PHP reflection to work around
// https://bugs.php.net/bug.php?id=53967
if ($object->isInternal() &&
isset(self::$uncloneableExtensions[$object->getExtensionName()])) {
$cloneable = FALSE;
$cloneable = false;
}
if ($cloneable === NULL) {
if ($cloneable === null) {
foreach (self::$uncloneableClasses as $class) {
if ($original instanceof $class) {
$cloneable = FALSE;
$cloneable = false;
break;
}
}
}
if ($cloneable === NULL && method_exists($object, 'isCloneable')) {
if ($cloneable === null && method_exists($object, 'isCloneable')) {
$cloneable = $object->isCloneable();
}
if ($cloneable === NULL && $object->hasMethod('__clone')) {
if ($cloneable === null && $object->hasMethod('__clone')) {
$method = $object->getMethod('__clone');
$cloneable = $method->isPublic();
}
if ($cloneable === NULL) {
$cloneable = TRUE;
if ($cloneable === null) {
$cloneable = true;
}
if ($cloneable) {
......
......@@ -15,13 +15,7 @@
* Keeps track of all expectations and stubs as well as registering
* identifications for builders.
*
* @package PHPUnit_MockObject
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright 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
* @since Class available since Release 1.0.0
* @since Class available since Release 1.0.0
*/
class PHPUnit_Framework_MockObject_InvocationMocker implements PHPUnit_Framework_MockObject_Stub_MatcherCollection, PHPUnit_Framework_MockObject_Invokable, PHPUnit_Framework_MockObject_Builder_Namespace
{
......@@ -50,16 +44,16 @@ public function hasMatchers()
{
foreach ($this->matchers as $matcher) {
if ($matcher->hasMatchers()) {
return TRUE;
return true;
}
}
return FALSE;
return false;
}
/**
* @param mixed $id
* @return boolean|null
* @param mixed $id
* @return bool|null
*/
public function lookupId($id)
{
......@@ -67,7 +61,7 @@ public function lookupId($id)
return $this->builderMap[$id];
}
return NULL;
return;
}
/**
......@@ -79,7 +73,7 @@ public function registerId($id, PHPUnit_Framework_MockObject_Builder_Match $buil
{
if (isset($this->builderMap[$id])) {
throw new PHPUnit_Framework_Exception(
'Match builder with id <' . $id . '> is already registered.'
'Match builder with id <' . $id . '> is already registered.'
);
}
......@@ -93,7 +87,8 @@ public function registerId($id, PHPUnit_Framework_MockObject_Builder_Match $buil
public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
{
return new PHPUnit_Framework_MockObject_Builder_InvocationMocker(
$this, $matcher