Composer data update
This commit is contained in:
6
www/vendor/phpspec/prophecy/CHANGES.md
vendored
6
www/vendor/phpspec/prophecy/CHANGES.md
vendored
@@ -1,3 +1,9 @@
|
||||
1.15.0 / 2021/12/08
|
||||
===================
|
||||
|
||||
* [added] Support for the `static` return type [@denis-rolling-scopes]
|
||||
* [fixed] Add return types for Comparator implementations to avoid deprecation warnings from Symfony's DebugClassLoader [@stof]
|
||||
|
||||
1.14.0 / 2021/09/16
|
||||
===================
|
||||
|
||||
|
||||
7
www/vendor/phpspec/prophecy/README.md
vendored
7
www/vendor/phpspec/prophecy/README.md
vendored
@@ -402,3 +402,10 @@ $em->flush()->shouldHaveBeenCalled();
|
||||
```
|
||||
|
||||
Such manipulation with doubles is called spying. And with Prophecy it just works.
|
||||
|
||||
|
||||
## FAQ
|
||||
|
||||
### Can I call the original methods on a prophesized class?
|
||||
|
||||
Prophecy does not support calling the original methods on a phrophesized class. If you find yourself needing to mock some methods of a class while calling the original version of other methods, it's likely a sign that your class violates the [single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) and should be refactored.
|
||||
|
||||
@@ -21,13 +21,13 @@ use SebastianBergmann\Comparator\ComparisonFailure;
|
||||
*/
|
||||
final class ClosureComparator extends Comparator
|
||||
{
|
||||
public function accepts($expected, $actual)
|
||||
public function accepts($expected, $actual): bool
|
||||
{
|
||||
return is_object($expected) && $expected instanceof \Closure
|
||||
&& is_object($actual) && $actual instanceof \Closure;
|
||||
}
|
||||
|
||||
public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array())
|
||||
public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array()): void
|
||||
{
|
||||
if ($expected !== $actual) {
|
||||
throw new ComparisonFailure(
|
||||
|
||||
@@ -14,14 +14,17 @@ namespace Prophecy\Comparator;
|
||||
use Prophecy\Prophecy\ProphecyInterface;
|
||||
use SebastianBergmann\Comparator\ObjectComparator;
|
||||
|
||||
/**
|
||||
* @final
|
||||
*/
|
||||
class ProphecyComparator extends ObjectComparator
|
||||
{
|
||||
public function accepts($expected, $actual)
|
||||
public function accepts($expected, $actual): bool
|
||||
{
|
||||
return is_object($expected) && is_object($actual) && $actual instanceof ProphecyInterface;
|
||||
}
|
||||
|
||||
public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array())
|
||||
public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false, array &$processed = array()): void
|
||||
{
|
||||
parent::assertEquals($expected, $actual->reveal(), $delta, $canonicalize, $ignoreCase, $processed);
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ abstract class TypeNodeAbstract
|
||||
|
||||
// built in types
|
||||
case 'self':
|
||||
case 'static':
|
||||
case 'array':
|
||||
case 'callable':
|
||||
case 'bool':
|
||||
|
||||
Reference in New Issue
Block a user