Composer update
This commit is contained in:
9
www/vendor/phpunit/phpunit/ChangeLog-8.5.md
vendored
9
www/vendor/phpunit/phpunit/ChangeLog-8.5.md
vendored
@@ -2,11 +2,16 @@
|
||||
|
||||
All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [8.5.30] - 2022-MM-DD
|
||||
## [8.5.30] - 2022-09-25
|
||||
|
||||
### Changed
|
||||
|
||||
* The configuration generator now asks for a cache directory
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4913](https://github.com/sebastianbergmann/phpunit/issues/4913): Failed `assert()` should show a backtrace
|
||||
* [#4966](https://github.com/sebastianbergmann/phpunit/issues/4966): `TestCase::assertSame()` (and related exact comparisons) must compare `float` exactly
|
||||
|
||||
## [8.5.29] - 2022-08-22
|
||||
|
||||
@@ -245,7 +250,7 @@ All notable changes of the PHPUnit 8.5 release series are documented in this fil
|
||||
* [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable`
|
||||
* [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside
|
||||
|
||||
[8.5.30]: https://github.com/sebastianbergmann/phpunit/compare/8.5.29...8.5
|
||||
[8.5.30]: https://github.com/sebastianbergmann/phpunit/compare/8.5.29...8.5.30
|
||||
[8.5.29]: https://github.com/sebastianbergmann/phpunit/compare/8.5.28...8.5.29
|
||||
[8.5.28]: https://github.com/sebastianbergmann/phpunit/compare/8.5.27...8.5.28
|
||||
[8.5.27]: https://github.com/sebastianbergmann/phpunit/compare/8.5.26...8.5.27
|
||||
|
||||
11
www/vendor/phpunit/phpunit/ChangeLog-9.5.md
vendored
11
www/vendor/phpunit/phpunit/ChangeLog-9.5.md
vendored
@@ -2,6 +2,16 @@
|
||||
|
||||
All notable changes of the PHPUnit 9.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [9.5.25] - 2022-09-25
|
||||
|
||||
### Added
|
||||
|
||||
* [#5042](https://github.com/sebastianbergmann/phpunit/issues/5042): Support Disjunctive Normal Form types
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4966](https://github.com/sebastianbergmann/phpunit/issues/4966): `TestCase::assertSame()` (and related exact comparisons) must compare `float` exactly
|
||||
|
||||
## [9.5.24] - 2022-08-30
|
||||
|
||||
### Added
|
||||
@@ -190,6 +200,7 @@ All notable changes of the PHPUnit 9.5 release series are documented in this fil
|
||||
|
||||
* [#4535](https://github.com/sebastianbergmann/phpunit/issues/4535): `getMockFromWsdl()` does not handle methods that do not have parameters correctly
|
||||
|
||||
[9.5.25]: https://github.com/sebastianbergmann/phpunit/compare/9.5.24...9.5.25
|
||||
[9.5.24]: https://github.com/sebastianbergmann/phpunit/compare/9.5.23...9.5.24
|
||||
[9.5.23]: https://github.com/sebastianbergmann/phpunit/compare/9.5.22...9.5.23
|
||||
[9.5.22]: https://github.com/sebastianbergmann/phpunit/compare/9.5.21...9.5.22
|
||||
|
||||
46
www/vendor/phpunit/phpunit/LICENSE
vendored
46
www/vendor/phpunit/phpunit/LICENSE
vendored
@@ -1,33 +1,29 @@
|
||||
PHPUnit
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2001-2022, Sebastian Bergmann <sebastian@phpunit.de>.
|
||||
Copyright (c) 2001-2022, Sebastian Bergmann
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
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.
|
||||
1. 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.
|
||||
2. 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.
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
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.
|
||||
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 HOLDER 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.
|
||||
|
||||
11
www/vendor/phpunit/phpunit/SECURITY.md
vendored
Normal file
11
www/vendor/phpunit/phpunit/SECURITY.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# Security Policy
|
||||
|
||||
PHPUnit is a framework for writing as well as a commandline tool for running tests. Writing and running tests is a development-time activity. There is no reason why PHPUnit should be installed on a webserver.
|
||||
|
||||
**If you upload PHPUnit to a webserver then your deployment process is broken. On a more general note, if your `vendor` directory is publicly accessible on your webserver then your deployment process is also broken.**
|
||||
|
||||
Please note that if you upload PHPUnit to a webserver "bad things" may happen. [You have been warned.](https://thephp.cc/articles/phpunit-a-security-risk)
|
||||
|
||||
## Security Contact Information
|
||||
|
||||
After the above, if you still would like to report a security vulnerability, please email `sebastian@phpunit.de`.
|
||||
6
www/vendor/phpunit/phpunit/composer.json
vendored
6
www/vendor/phpunit/phpunit/composer.json
vendored
@@ -39,14 +39,14 @@
|
||||
"phpunit/php-timer": "^5.0.2",
|
||||
"sebastian/cli-parser": "^1.0.1",
|
||||
"sebastian/code-unit": "^1.0.6",
|
||||
"sebastian/comparator": "^4.0.5",
|
||||
"sebastian/comparator": "^4.0.8",
|
||||
"sebastian/diff": "^4.0.3",
|
||||
"sebastian/environment": "^5.1.3",
|
||||
"sebastian/exporter": "^4.0.3",
|
||||
"sebastian/exporter": "^4.0.5",
|
||||
"sebastian/global-state": "^5.0.1",
|
||||
"sebastian/object-enumerator": "^4.0.3",
|
||||
"sebastian/resource-operations": "^3.0.3",
|
||||
"sebastian/type": "^3.1",
|
||||
"sebastian/type": "^3.2",
|
||||
"sebastian/version": "^3.0.2"
|
||||
},
|
||||
"config": {
|
||||
|
||||
@@ -1321,7 +1321,9 @@ abstract class Assert
|
||||
* @throws ExpectationFailedException
|
||||
*
|
||||
* @psalm-template ExpectedType
|
||||
*
|
||||
* @psalm-param ExpectedType $expected
|
||||
*
|
||||
* @psalm-assert =ExpectedType $actual
|
||||
*/
|
||||
public static function assertSame($expected, $actual, string $message = ''): void
|
||||
@@ -1364,7 +1366,9 @@ abstract class Assert
|
||||
* @throws ExpectationFailedException
|
||||
*
|
||||
* @psalm-template ExpectedType of object
|
||||
*
|
||||
* @psalm-param class-string<ExpectedType> $expected
|
||||
*
|
||||
* @psalm-assert =ExpectedType $actual
|
||||
*/
|
||||
public static function assertInstanceOf(string $expected, $actual, string $message = ''): void
|
||||
@@ -1388,7 +1392,9 @@ abstract class Assert
|
||||
* @throws ExpectationFailedException
|
||||
*
|
||||
* @psalm-template ExpectedType of object
|
||||
*
|
||||
* @psalm-param class-string<ExpectedType> $expected
|
||||
*
|
||||
* @psalm-assert !ExpectedType $actual
|
||||
*/
|
||||
public static function assertNotInstanceOf(string $expected, $actual, string $message = ''): void
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
namespace PHPUnit\Framework;
|
||||
|
||||
use function func_get_args;
|
||||
use function function_exists;
|
||||
use ArrayAccess;
|
||||
use Countable;
|
||||
use DOMDocument;
|
||||
@@ -1453,7 +1454,9 @@ if (!function_exists('PHPUnit\Framework\assertSame')) {
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*
|
||||
* @psalm-template ExpectedType
|
||||
*
|
||||
* @psalm-param ExpectedType $expected
|
||||
*
|
||||
* @psalm-assert =ExpectedType $actual
|
||||
*
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
@@ -1494,7 +1497,9 @@ if (!function_exists('PHPUnit\Framework\assertInstanceOf')) {
|
||||
* @throws Exception
|
||||
*
|
||||
* @psalm-template ExpectedType of object
|
||||
*
|
||||
* @psalm-param class-string<ExpectedType> $expected
|
||||
*
|
||||
* @psalm-assert =ExpectedType $actual
|
||||
*
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
@@ -1516,7 +1521,9 @@ if (!function_exists('PHPUnit\Framework\assertNotInstanceOf')) {
|
||||
* @throws Exception
|
||||
*
|
||||
* @psalm-template ExpectedType of object
|
||||
*
|
||||
* @psalm-param class-string<ExpectedType> $expected
|
||||
*
|
||||
* @psalm-assert !ExpectedType $actual
|
||||
*
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
|
||||
@@ -82,6 +82,7 @@ abstract class Constraint implements Countable, SelfDescribing
|
||||
* This method can be overridden to implement the evaluation algorithm.
|
||||
*
|
||||
* @param mixed $other value or object to evaluate
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
protected function matches($other): bool
|
||||
|
||||
@@ -9,13 +9,8 @@
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use const PHP_FLOAT_EPSILON;
|
||||
use function abs;
|
||||
use function get_class;
|
||||
use function is_array;
|
||||
use function is_float;
|
||||
use function is_infinite;
|
||||
use function is_nan;
|
||||
use function is_object;
|
||||
use function is_string;
|
||||
use function sprintf;
|
||||
@@ -52,13 +47,7 @@ final class IsIdentical extends Constraint
|
||||
*/
|
||||
public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
|
||||
{
|
||||
if (is_float($this->value) && is_float($other) &&
|
||||
!is_infinite($this->value) && !is_infinite($other) &&
|
||||
!is_nan($this->value) && !is_nan($other)) {
|
||||
$success = abs($this->value - $other) < PHP_FLOAT_EPSILON;
|
||||
} else {
|
||||
$success = $this->value === $other;
|
||||
}
|
||||
$success = $this->value === $other;
|
||||
|
||||
if ($returnResult) {
|
||||
return $success;
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
*/
|
||||
namespace PHPUnit\Framework\MockObject;
|
||||
|
||||
use function array_diff_assoc;
|
||||
use function array_unique;
|
||||
use function implode;
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
*/
|
||||
namespace PHPUnit\Framework\MockObject;
|
||||
|
||||
use function get_class;
|
||||
use function gettype;
|
||||
use function is_object;
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
*/
|
||||
namespace PHPUnit\Framework\MockObject;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
|
||||
@@ -291,7 +291,9 @@ EOT;
|
||||
* Concrete methods to mock can be specified with the $mockedMethods parameter.
|
||||
*
|
||||
* @psalm-template RealInstanceType of object
|
||||
*
|
||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||
*
|
||||
* @psalm-return MockObject&RealInstanceType
|
||||
*
|
||||
* @throws \PHPUnit\Framework\InvalidArgumentException
|
||||
|
||||
@@ -13,6 +13,8 @@ use function array_map;
|
||||
use function explode;
|
||||
use function get_class;
|
||||
use function implode;
|
||||
use function in_array;
|
||||
use function interface_exists;
|
||||
use function is_object;
|
||||
use function sprintf;
|
||||
use function strpos;
|
||||
@@ -20,7 +22,7 @@ use function strtolower;
|
||||
use function substr;
|
||||
use Doctrine\Instantiator\Instantiator;
|
||||
use PHPUnit\Framework\SelfDescribing;
|
||||
use PHPUnit\Util\Type;
|
||||
use PHPUnit\Util\Cloner;
|
||||
use SebastianBergmann\Exporter\Exporter;
|
||||
use stdClass;
|
||||
use Throwable;
|
||||
@@ -90,7 +92,7 @@ final class Invocation implements SelfDescribing
|
||||
|
||||
foreach ($this->parameters as $key => $value) {
|
||||
if (is_object($value)) {
|
||||
$this->parameters[$key] = $this->cloneObject($value);
|
||||
$this->parameters[$key] = Cloner::clone($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,12 +123,17 @@ final class Invocation implements SelfDescribing
|
||||
return null;
|
||||
}
|
||||
|
||||
$intersection = false;
|
||||
$union = false;
|
||||
$intersection = false;
|
||||
$union = false;
|
||||
$unionContainsIntersections = false;
|
||||
|
||||
if (strpos($this->returnType, '|') !== false) {
|
||||
$types = explode('|', $this->returnType);
|
||||
$union = true;
|
||||
|
||||
if (strpos($this->returnType, '(') !== false) {
|
||||
$unionContainsIntersections = true;
|
||||
}
|
||||
} elseif (strpos($this->returnType, '&') !== false) {
|
||||
$types = explode('&', $this->returnType);
|
||||
$intersection = true;
|
||||
@@ -136,7 +143,7 @@ final class Invocation implements SelfDescribing
|
||||
|
||||
$types = array_map('strtolower', $types);
|
||||
|
||||
if (!$intersection) {
|
||||
if (!$intersection && !$unionContainsIntersections) {
|
||||
if (in_array('', $types, true) ||
|
||||
in_array('null', $types, true) ||
|
||||
in_array('mixed', $types, true) ||
|
||||
@@ -220,38 +227,28 @@ final class Invocation implements SelfDescribing
|
||||
}
|
||||
}
|
||||
|
||||
if ($intersection && $this->onlyInterfaces($types)) {
|
||||
try {
|
||||
return (new Generator)->getMockForInterfaces($types);
|
||||
} catch (Throwable $t) {
|
||||
throw new RuntimeException(
|
||||
sprintf(
|
||||
'Return value for %s::%s() cannot be generated: %s',
|
||||
$this->className,
|
||||
$this->methodName,
|
||||
$t->getMessage(),
|
||||
),
|
||||
(int) $t->getCode(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$reason = '';
|
||||
|
||||
if ($union) {
|
||||
$reason = ' because the declared return type is a union';
|
||||
} elseif ($intersection) {
|
||||
$reason = ' because the declared return type is an intersection';
|
||||
|
||||
$onlyInterfaces = true;
|
||||
|
||||
foreach ($types as $type) {
|
||||
if (!interface_exists($type)) {
|
||||
$onlyInterfaces = false;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($onlyInterfaces) {
|
||||
try {
|
||||
return (new Generator)->getMockForInterfaces($types);
|
||||
} catch (Throwable $t) {
|
||||
throw new RuntimeException(
|
||||
sprintf(
|
||||
'Return value for %s::%s() cannot be generated: %s',
|
||||
$this->className,
|
||||
$this->methodName,
|
||||
$t->getMessage(),
|
||||
),
|
||||
(int) $t->getCode(),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new RuntimeException(
|
||||
@@ -288,12 +285,17 @@ final class Invocation implements SelfDescribing
|
||||
return $this->object;
|
||||
}
|
||||
|
||||
private function cloneObject(object $original): object
|
||||
/**
|
||||
* @psalm-param non-empty-list<string> $types
|
||||
*/
|
||||
private function onlyInterfaces(array $types): bool
|
||||
{
|
||||
if (Type::isCloneable($original)) {
|
||||
return clone $original;
|
||||
foreach ($types as $type) {
|
||||
if (!interface_exists($type)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return $original;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,11 +23,8 @@ use function substr;
|
||||
use function substr_count;
|
||||
use function trim;
|
||||
use function var_export;
|
||||
use ReflectionIntersectionType;
|
||||
use ReflectionMethod;
|
||||
use ReflectionNamedType;
|
||||
use ReflectionParameter;
|
||||
use ReflectionUnionType;
|
||||
use SebastianBergmann\Template\Exception as TemplateException;
|
||||
use SebastianBergmann\Template\Template;
|
||||
use SebastianBergmann\Type\ReflectionMapper;
|
||||
@@ -274,6 +271,7 @@ final class MockMethod
|
||||
private static function getMethodParametersForDeclaration(ReflectionMethod $method): string
|
||||
{
|
||||
$parameters = [];
|
||||
$types = (new ReflectionMapper)->fromParameterTypes($method);
|
||||
|
||||
foreach ($method->getParameters() as $i => $parameter) {
|
||||
$name = '$' . $parameter->getName();
|
||||
@@ -285,19 +283,16 @@ final class MockMethod
|
||||
$name = '$arg' . $i;
|
||||
}
|
||||
|
||||
$nullable = '';
|
||||
$default = '';
|
||||
$reference = '';
|
||||
$typeDeclaration = '';
|
||||
$type = null;
|
||||
$typeName = null;
|
||||
|
||||
if ($parameter->hasType()) {
|
||||
$type = $parameter->getType();
|
||||
if (!$types[$i]->type()->isUnknown()) {
|
||||
$typeDeclaration = $types[$i]->type()->asString() . ' ';
|
||||
}
|
||||
|
||||
if ($type instanceof ReflectionNamedType) {
|
||||
$typeName = $type->getName();
|
||||
}
|
||||
if ($parameter->isPassedByReference()) {
|
||||
$reference = '&';
|
||||
}
|
||||
|
||||
if ($parameter->isVariadic()) {
|
||||
@@ -308,34 +303,7 @@ final class MockMethod
|
||||
$default = ' = null';
|
||||
}
|
||||
|
||||
if ($type !== null) {
|
||||
if ($typeName !== 'mixed' &&
|
||||
$typeName !== 'null' &&
|
||||
!$type instanceof ReflectionIntersectionType &&
|
||||
!$type instanceof ReflectionUnionType &&
|
||||
$parameter->allowsNull()) {
|
||||
$nullable = '?';
|
||||
}
|
||||
|
||||
if ($typeName === 'self') {
|
||||
$typeDeclaration = $method->getDeclaringClass()->getName() . ' ';
|
||||
} elseif ($typeName !== null) {
|
||||
$typeDeclaration = $typeName . ' ';
|
||||
} elseif ($type instanceof ReflectionUnionType) {
|
||||
$typeDeclaration = self::unionTypeAsString(
|
||||
$type,
|
||||
$method->getDeclaringClass()->getName()
|
||||
);
|
||||
} elseif ($type instanceof ReflectionIntersectionType) {
|
||||
$typeDeclaration = self::intersectionTypeAsString($type);
|
||||
}
|
||||
}
|
||||
|
||||
if ($parameter->isPassedByReference()) {
|
||||
$reference = '&';
|
||||
}
|
||||
|
||||
$parameters[] = $nullable . $typeDeclaration . $reference . $name . $default;
|
||||
$parameters[] = $typeDeclaration . $reference . $name . $default;
|
||||
}
|
||||
|
||||
return implode(', ', $parameters);
|
||||
@@ -409,30 +377,4 @@ final class MockMethod
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
private static function unionTypeAsString(ReflectionUnionType $union, string $self): string
|
||||
{
|
||||
$types = [];
|
||||
|
||||
foreach ($union->getTypes() as $type) {
|
||||
if ((string) $type === 'self') {
|
||||
$types[] = $self;
|
||||
} else {
|
||||
$types[] = $type;
|
||||
}
|
||||
}
|
||||
|
||||
return implode('|', $types) . ' ';
|
||||
}
|
||||
|
||||
private static function intersectionTypeAsString(ReflectionIntersectionType $intersection): string
|
||||
{
|
||||
$types = [];
|
||||
|
||||
foreach ($intersection->getTypes() as $type) {
|
||||
$types[] = $type;
|
||||
}
|
||||
|
||||
return implode('&', $types) . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ use PHPUnit\Framework\MockObject\Invocation as BaseInvocation;
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
final class InvokedAtIndex extends InvocationOrder
|
||||
|
||||
@@ -91,11 +91,11 @@ use PHPUnit\Framework\MockObject\Stub\ReturnStub;
|
||||
use PHPUnit\Framework\MockObject\Stub\ReturnValueMap as ReturnValueMapStub;
|
||||
use PHPUnit\Runner\BaseTestRunner;
|
||||
use PHPUnit\Runner\PhptTestCase;
|
||||
use PHPUnit\Util\Cloner;
|
||||
use PHPUnit\Util\Exception as UtilException;
|
||||
use PHPUnit\Util\GlobalState;
|
||||
use PHPUnit\Util\PHP\AbstractPhpProcess;
|
||||
use PHPUnit\Util\Test as TestUtil;
|
||||
use PHPUnit\Util\Type;
|
||||
use Prophecy\Exception\Prediction\PredictionException;
|
||||
use Prophecy\Prophecy\MethodProphecy;
|
||||
use Prophecy\Prophecy\ObjectProphecy;
|
||||
@@ -417,6 +417,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
* at the given index.
|
||||
*
|
||||
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/4297
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public static function at(int $index): InvokedAtIndexMatcher
|
||||
@@ -912,7 +913,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
* Returns a builder object to create mock objects using a fluent interface.
|
||||
*
|
||||
* @psalm-template RealInstanceType of object
|
||||
*
|
||||
* @psalm-param class-string<RealInstanceType> $className
|
||||
*
|
||||
* @psalm-return MockBuilder<RealInstanceType>
|
||||
*/
|
||||
public function getMockBuilder(string $className): MockBuilder
|
||||
@@ -1699,7 +1702,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
* Makes configurable stub for the specified class.
|
||||
*
|
||||
* @psalm-template RealInstanceType of object
|
||||
*
|
||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||
*
|
||||
* @psalm-return Stub&RealInstanceType
|
||||
*/
|
||||
protected function createStub(string $originalClassName): Stub
|
||||
@@ -1711,7 +1716,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
* Returns a mock object for the specified class.
|
||||
*
|
||||
* @psalm-template RealInstanceType of object
|
||||
*
|
||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||
*
|
||||
* @psalm-return MockObject&RealInstanceType
|
||||
*/
|
||||
protected function createMock(string $originalClassName): MockObject
|
||||
@@ -1723,7 +1730,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
* Returns a configured mock object for the specified class.
|
||||
*
|
||||
* @psalm-template RealInstanceType of object
|
||||
*
|
||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||
*
|
||||
* @psalm-return MockObject&RealInstanceType
|
||||
*/
|
||||
protected function createConfiguredMock(string $originalClassName, array $configuration): MockObject
|
||||
@@ -1743,7 +1752,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
* @param string[] $methods
|
||||
*
|
||||
* @psalm-template RealInstanceType of object
|
||||
*
|
||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||
*
|
||||
* @psalm-return MockObject&RealInstanceType
|
||||
*/
|
||||
protected function createPartialMock(string $originalClassName, array $methods): MockObject
|
||||
@@ -1791,7 +1802,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
* Returns a test proxy for the specified class.
|
||||
*
|
||||
* @psalm-template RealInstanceType of object
|
||||
*
|
||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||
*
|
||||
* @psalm-return MockObject&RealInstanceType
|
||||
*/
|
||||
protected function createTestProxy(string $originalClassName, array $constructorArguments = []): MockObject
|
||||
@@ -1808,7 +1821,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
* @param null|array $methods $methods
|
||||
*
|
||||
* @psalm-template RealInstanceType of object
|
||||
*
|
||||
* @psalm-param class-string<RealInstanceType>|string $originalClassName
|
||||
*
|
||||
* @psalm-return class-string<MockObject&RealInstanceType>
|
||||
*/
|
||||
protected function getMockClass(string $originalClassName, $methods = [], array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = false, bool $callOriginalClone = true, bool $callAutoload = true, bool $cloneArguments = false): string
|
||||
@@ -1835,7 +1850,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
* To mock concrete methods, use the 7th parameter ($mockedMethods).
|
||||
*
|
||||
* @psalm-template RealInstanceType of object
|
||||
*
|
||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||
*
|
||||
* @psalm-return MockObject&RealInstanceType
|
||||
*/
|
||||
protected function getMockForAbstractClass(string $originalClassName, array $arguments = [], string $mockClassName = '', bool $callOriginalConstructor = true, bool $callOriginalClone = true, bool $callAutoload = true, array $mockedMethods = [], bool $cloneArguments = false): MockObject
|
||||
@@ -1862,7 +1879,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
* Returns a mock object based on the given WSDL file.
|
||||
*
|
||||
* @psalm-template RealInstanceType of object
|
||||
*
|
||||
* @psalm-param class-string<RealInstanceType>|string $originalClassName
|
||||
*
|
||||
* @psalm-return MockObject&RealInstanceType
|
||||
*/
|
||||
protected function getMockFromWsdl(string $wsdlFile, string $originalClassName = '', string $mockClassName = '', array $methods = [], bool $callOriginalConstructor = true, array $options = []): MockObject
|
||||
@@ -2434,9 +2453,7 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
} else {
|
||||
foreach ($testArguments as $testArgument) {
|
||||
if ($testArgument instanceof MockObject) {
|
||||
if (Type::isCloneable($testArgument)) {
|
||||
$testArgument = clone $testArgument;
|
||||
}
|
||||
$testArgument = Cloner::clone($testArgument);
|
||||
|
||||
$this->registerMockObject($testArgument);
|
||||
} elseif (is_array($testArgument) && !in_array($testArgument, $visited, true)) {
|
||||
@@ -2569,7 +2586,9 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T
|
||||
|
||||
/**
|
||||
* @psalm-template RealInstanceType of object
|
||||
*
|
||||
* @psalm-param class-string<RealInstanceType> $originalClassName
|
||||
*
|
||||
* @psalm-return MockObject&RealInstanceType
|
||||
*/
|
||||
private function createMockObject(string $originalClassName): MockObject
|
||||
|
||||
@@ -13,6 +13,7 @@ use Throwable;
|
||||
|
||||
/**
|
||||
* @deprecated The `TestListener` interface is deprecated
|
||||
*
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
trait TestListenerDefaultImplementation
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
namespace PHPUnit\Framework;
|
||||
|
||||
use const PHP_EOL;
|
||||
use function class_exists;
|
||||
use function count;
|
||||
use function extension_loaded;
|
||||
use function function_exists;
|
||||
use function get_class;
|
||||
use function sprintf;
|
||||
|
||||
@@ -13,6 +13,7 @@ use const PHP_EOL;
|
||||
use function array_keys;
|
||||
use function array_map;
|
||||
use function array_merge;
|
||||
use function array_slice;
|
||||
use function array_unique;
|
||||
use function basename;
|
||||
use function call_user_func;
|
||||
|
||||
@@ -21,6 +21,7 @@ use function is_dir;
|
||||
use function is_file;
|
||||
use function json_decode;
|
||||
use function json_encode;
|
||||
use function sprintf;
|
||||
use PHPUnit\Util\Filesystem;
|
||||
|
||||
/**
|
||||
|
||||
@@ -100,6 +100,7 @@ final class ExtensionHandler
|
||||
if ($extensionConfiguration->hasSourceFile()) {
|
||||
/**
|
||||
* @noinspection PhpIncludeInspection
|
||||
*
|
||||
* @psalm-suppress UnresolvableInclude
|
||||
*/
|
||||
require_once $extensionConfiguration->sourceFile();
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
namespace PHPUnit\Runner\Extension;
|
||||
|
||||
use function is_file;
|
||||
use PharIo\Manifest\ApplicationName;
|
||||
use PharIo\Manifest\Exception as ManifestException;
|
||||
use PharIo\Manifest\ManifestLoader;
|
||||
@@ -60,6 +61,7 @@ final class PharLoader
|
||||
|
||||
/**
|
||||
* @noinspection PhpIncludeInspection
|
||||
*
|
||||
* @psalm-suppress UnresolvableInclude
|
||||
*/
|
||||
require $file;
|
||||
|
||||
@@ -41,7 +41,7 @@ final class Version
|
||||
}
|
||||
|
||||
if (self::$version === '') {
|
||||
self::$version = (new VersionId('9.5.24', dirname(__DIR__, 2)))->getVersion();
|
||||
self::$version = (new VersionId('9.5.25', dirname(__DIR__, 2)))->getVersion();
|
||||
}
|
||||
|
||||
return self::$version;
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\Extension;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Configuration
|
||||
|
||||
@@ -24,6 +24,7 @@ use function get_class;
|
||||
use function getcwd;
|
||||
use function ini_get;
|
||||
use function ini_set;
|
||||
use function is_array;
|
||||
use function is_callable;
|
||||
use function is_dir;
|
||||
use function is_file;
|
||||
@@ -437,6 +438,7 @@ class Command
|
||||
if ($loaderFile) {
|
||||
/**
|
||||
* @noinspection PhpIncludeInspection
|
||||
*
|
||||
* @psalm-suppress UnresolvableInclude
|
||||
*/
|
||||
require $loaderFile;
|
||||
@@ -498,6 +500,7 @@ class Command
|
||||
if ($printerFile) {
|
||||
/**
|
||||
* @noinspection PhpIncludeInspection
|
||||
*
|
||||
* @psalm-suppress UnresolvableInclude
|
||||
*/
|
||||
require $printerFile;
|
||||
|
||||
@@ -24,6 +24,7 @@ use PHPUnit\TextUI\XmlConfiguration\FileCollection;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class CodeCoverage
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Directory
|
||||
|
||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class DirectoryCollection implements Countable, IteratorAggregate
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Clover
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Cobertura
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Crap4j
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\Directory;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Html
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Php
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Text
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\Directory;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Xml
|
||||
|
||||
@@ -15,6 +15,7 @@ use PHPUnit\Util\Xml\ValidationResult;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Configuration
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Directory
|
||||
|
||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class DirectoryCollection implements Countable, IteratorAggregate
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class File
|
||||
|
||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class FileCollection implements Countable, IteratorAggregate
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Group
|
||||
|
||||
@@ -13,6 +13,7 @@ use IteratorAggregate;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class GroupCollection implements IteratorAggregate
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Groups
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Junit
|
||||
|
||||
@@ -16,6 +16,7 @@ use PHPUnit\TextUI\XmlConfiguration\Logging\TestDox\Xml as TestDoxXml;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Logging
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class TeamCity
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Html
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Text
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Xml
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\TextUI\XmlConfiguration\File;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Text
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
*/
|
||||
namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
use function assert;
|
||||
use function in_array;
|
||||
use DOMDocument;
|
||||
use DOMElement;
|
||||
use PHPUnit\Util\Xml\SnapshotNodeList;
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Constant
|
||||
|
||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class ConstantCollection implements Countable, IteratorAggregate
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class IniSetting
|
||||
|
||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class IniSettingCollection implements Countable, IteratorAggregate
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Php
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Variable
|
||||
|
||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class VariableCollection implements Countable, IteratorAggregate
|
||||
|
||||
@@ -11,12 +11,14 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class Extension
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @psalm-var class-string
|
||||
*/
|
||||
private $className;
|
||||
|
||||
@@ -13,6 +13,7 @@ use IteratorAggregate;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class ExtensionCollection implements IteratorAggregate
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class PHPUnit
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\Util\VersionComparisonOperator;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class TestDirectory
|
||||
|
||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class TestDirectoryCollection implements Countable, IteratorAggregate
|
||||
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\Util\VersionComparisonOperator;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class TestFile
|
||||
|
||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class TestFileCollection implements Countable, IteratorAggregate
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\XmlConfiguration;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class TestSuite
|
||||
|
||||
@@ -15,6 +15,7 @@ use IteratorAggregate;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class TestSuiteCollection implements Countable, IteratorAggregate
|
||||
|
||||
@@ -43,6 +43,7 @@ final class Registry
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*
|
||||
* @psalm-param class-string $class
|
||||
*/
|
||||
public function forClassName(string $class): DocBlock
|
||||
@@ -68,6 +69,7 @@ final class Registry
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*
|
||||
* @psalm-param class-string $classInHierarchy
|
||||
*/
|
||||
public function forMethod(string $classInHierarchy, string $method): DocBlock
|
||||
|
||||
34
www/vendor/phpunit/phpunit/src/Util/Cloner.php
vendored
Normal file
34
www/vendor/phpunit/phpunit/src/Util/Cloner.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Util;
|
||||
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class Cloner
|
||||
{
|
||||
/**
|
||||
* @psalm-template OriginalType
|
||||
*
|
||||
* @psalm-param OriginalType $original
|
||||
*
|
||||
* @psalm-return OriginalType
|
||||
*/
|
||||
public static function clone(object $original): object
|
||||
{
|
||||
try {
|
||||
return clone $original;
|
||||
} catch (Throwable $t) {
|
||||
return $original;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,7 @@ final class FileLoader
|
||||
|
||||
/**
|
||||
* @noinspection PhpIncludeInspection
|
||||
*
|
||||
* @psalm-suppress UnresolvableInclude
|
||||
*/
|
||||
include_once $filename;
|
||||
|
||||
6
www/vendor/phpunit/phpunit/src/Util/Test.php
vendored
6
www/vendor/phpunit/phpunit/src/Util/Test.php
vendored
@@ -112,6 +112,7 @@ final class Test
|
||||
* @throws CodeCoverageException
|
||||
*
|
||||
* @return array|bool
|
||||
*
|
||||
* @psalm-param class-string $className
|
||||
*/
|
||||
public static function getLinesToBeCovered(string $className, string $methodName)
|
||||
@@ -132,6 +133,7 @@ final class Test
|
||||
* Returns lines of code specified with the @uses annotation.
|
||||
*
|
||||
* @throws CodeCoverageException
|
||||
*
|
||||
* @psalm-param class-string $className
|
||||
*/
|
||||
public static function getLinesToBeUsed(string $className, string $methodName): array
|
||||
@@ -173,6 +175,7 @@ final class Test
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*
|
||||
* @psalm-param class-string $className
|
||||
*/
|
||||
public static function getRequirements(string $className, string $methodName): array
|
||||
@@ -188,6 +191,7 @@ final class Test
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Warning
|
||||
*
|
||||
* @psalm-param class-string $className
|
||||
*/
|
||||
public static function getMissingRequirements(string $className, string $methodName): array
|
||||
@@ -316,6 +320,7 @@ final class Test
|
||||
* Returns the provided data for a method.
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
* @psalm-param class-string $className
|
||||
*/
|
||||
public static function getProvidedData(string $className, string $methodName): ?array
|
||||
@@ -592,6 +597,7 @@ final class Test
|
||||
|
||||
/**
|
||||
* @throws CodeCoverageException
|
||||
*
|
||||
* @psalm-param class-string $className
|
||||
*/
|
||||
private static function getLinesToBeCoveredOrUsed(string $className, string $methodName, string $mode): array
|
||||
|
||||
13
www/vendor/phpunit/phpunit/src/Util/Type.php
vendored
13
www/vendor/phpunit/phpunit/src/Util/Type.php
vendored
@@ -9,8 +9,6 @@
|
||||
*/
|
||||
namespace PHPUnit\Util;
|
||||
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
@@ -38,15 +36,4 @@ final class Type
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static function isCloneable(object $object): bool
|
||||
{
|
||||
try {
|
||||
$clone = clone $object;
|
||||
} catch (Throwable $t) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $clone instanceof $object;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ use function sprintf;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
final class VersionComparisonOperator
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
namespace PHPUnit\Util\Xml;
|
||||
|
||||
use function count;
|
||||
use ArrayIterator;
|
||||
use Countable;
|
||||
use DOMNode;
|
||||
|
||||
@@ -32,7 +32,7 @@ final class XmlTestListRenderer
|
||||
|
||||
$writer->openMemory();
|
||||
$writer->setIndent(true);
|
||||
$writer->startDocument();
|
||||
$writer->startDocument('1.0', 'UTF-8');
|
||||
$writer->startElement('tests');
|
||||
|
||||
$currentTestCase = null;
|
||||
@@ -84,6 +84,7 @@ final class XmlTestListRenderer
|
||||
}
|
||||
|
||||
$writer->endElement();
|
||||
$writer->endDocument();
|
||||
|
||||
return $writer->outputMemory();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user