updated dependencies
This commit is contained in:
1
vendor/phpunit/phpunit/.gitattributes
vendored
1
vendor/phpunit/phpunit/.gitattributes
vendored
@@ -1,3 +1,4 @@
|
||||
/.docker export-ignore
|
||||
/build export-ignore
|
||||
/tools export-ignore
|
||||
/tools/* binary
|
||||
|
||||
70
vendor/phpunit/phpunit/.github/workflows/ci.yml
vendored
70
vendor/phpunit/phpunit/.github/workflows/ci.yml
vendored
@@ -1,18 +1,84 @@
|
||||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
- push
|
||||
|
||||
name: CI
|
||||
|
||||
jobs:
|
||||
coding-guidelines:
|
||||
name: Coding Guidelines
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Run friendsofphp/php-cs-fixer
|
||||
run: php7.3 tools/php-cs-fixer fix --diff-format=udiff --dry-run --show-progress=dots --using-cache=no --verbose
|
||||
run: php7.3 ./tools/php-cs-fixer fix --diff-format=udiff --dry-run --show-progress=dots --using-cache=no --verbose
|
||||
|
||||
lint-xml-configuration:
|
||||
name: Lint XML Configuration
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Build Docker image
|
||||
uses: ./.docker/lint-xml-configuration
|
||||
|
||||
- name: Lint XML configuration files
|
||||
uses: ./.docker/lint-xml-configuration
|
||||
with:
|
||||
args: bash ./build/lint-xml-configuration
|
||||
|
||||
tests:
|
||||
name: Tests
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-binary:
|
||||
- php7.1
|
||||
- php7.2
|
||||
- php7.3
|
||||
|
||||
dependencies:
|
||||
- lowest
|
||||
- highest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: "Cache dependencies installed with composer"
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.composer/cache
|
||||
key: ${{ matrix.php-binary }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}
|
||||
restore-keys: |
|
||||
${{ matrix.php-binary }}-composer-${{ matrix.dependencies }}-
|
||||
|
||||
- name: Install lowest dependencies with composer
|
||||
if: matrix.dependencies == 'lowest'
|
||||
run: ${{ matrix.php-binary }} ./tools/composer update --no-ansi --no-interaction --no-progress --no-suggest --prefer-lowest
|
||||
|
||||
- name: Install highest dependencies with composer
|
||||
if: matrix.dependencies == 'highest'
|
||||
run: ${{ matrix.php-binary }} ./tools/composer update --no-ansi --no-interaction --no-progress --no-suggest
|
||||
|
||||
- name: Run sanity check
|
||||
run: PHP_BINARY=${{ matrix.php-binary }} bash ./build/sanity-check
|
||||
|
||||
- name: Run tests with phpunit
|
||||
run: ${{ matrix.php-binary }} -d assert.exception=1 -d zend.assertions=1 ./phpunit --coverage-clover=coverage.xml
|
||||
|
||||
- name: Send code coverage report to Codecov.io
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
run: bash <(curl -s https://codecov.io/bash) || true
|
||||
|
||||
1
vendor/phpunit/phpunit/.gitignore
vendored
1
vendor/phpunit/phpunit/.gitignore
vendored
@@ -18,3 +18,4 @@
|
||||
/tests/end-to-end/*.php
|
||||
/vendor
|
||||
.phpunit.result.cache
|
||||
.psalm
|
||||
|
||||
58
vendor/phpunit/phpunit/.travis.yml
vendored
58
vendor/phpunit/phpunit/.travis.yml
vendored
@@ -1,46 +1,38 @@
|
||||
language: php
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libxml2-utils
|
||||
jobs:
|
||||
include:
|
||||
- &COLLECT_CODE_COVERAGE
|
||||
|
||||
php:
|
||||
- 7.1
|
||||
- 7.2
|
||||
- 7.3
|
||||
stage: Collect Code Coverage
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
php: 7.1
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- DEPENDENCIES="high"
|
||||
- DEPENDENCIES="low"
|
||||
global:
|
||||
- DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest"
|
||||
if: type = pull_request
|
||||
|
||||
before_install:
|
||||
- ./tools/composer clear-cache
|
||||
before_install:
|
||||
- ./tools/composer clear-cache
|
||||
|
||||
install:
|
||||
- if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry ./tools/composer update $DEFAULT_COMPOSER_FLAGS; fi
|
||||
- if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry ./tools/composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest; fi
|
||||
install:
|
||||
- travis_retry ./tools/composer update --no-ansi --no-interaction --no-progress --no-suggest
|
||||
|
||||
before_script:
|
||||
- echo 'zend.assertions=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
- echo 'assert.exception=On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
before_script:
|
||||
- echo 'zend.assertions=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
- echo 'assert.exception=On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
|
||||
script:
|
||||
- ./phpunit --coverage-clover=coverage.xml
|
||||
- ./phpunit --configuration ./build/travis-ci-fail.xml > /dev/null; if [ $? -eq 0 ]; then echo "SHOULD FAIL"; false; else echo "fail checked"; fi;
|
||||
- xmllint --noout --schema phpunit.xsd phpunit.xml
|
||||
- xmllint --noout --schema phpunit.xsd tests/_files/configuration.xml
|
||||
- xmllint --noout --schema phpunit.xsd tests/_files/configuration_empty.xml
|
||||
- xmllint --noout --schema phpunit.xsd tests/_files/configuration_xinclude.xml -xinclude
|
||||
script:
|
||||
- ./phpunit --coverage-clover=coverage.xml
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
- <<: *COLLECT_CODE_COVERAGE
|
||||
|
||||
php: 7.2
|
||||
|
||||
- <<: *COLLECT_CODE_COVERAGE
|
||||
|
||||
php: 7.3
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
10
vendor/phpunit/phpunit/ChangeLog-7.5.md
vendored
10
vendor/phpunit/phpunit/ChangeLog-7.5.md
vendored
@@ -1,6 +1,13 @@
|
||||
# Changes in PHPUnit 7.5
|
||||
|
||||
All notable changes of the PHPUnit 7.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
All notable changes of the PHPUnit 7.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [7.5.18] - 2019-12-06
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable`
|
||||
* Fixed [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside
|
||||
|
||||
## [7.5.17] - 2019-10-28
|
||||
|
||||
@@ -152,6 +159,7 @@ All notable changes of the PHPUnit 7.5 release series are documented in this fil
|
||||
* Fixed [#3429](https://github.com/sebastianbergmann/phpunit/pull/3429): Inefficient loop in `getHookMethods()`
|
||||
* Fixed [#3437](https://github.com/sebastianbergmann/phpunit/pull/3437): JUnit logger skips PHPT tests
|
||||
|
||||
[7.5.18]: https://github.com/sebastianbergmann/phpunit/compare/7.5.17...7.5.18
|
||||
[7.5.17]: https://github.com/sebastianbergmann/phpunit/compare/7.5.16...7.5.17
|
||||
[7.5.16]: https://github.com/sebastianbergmann/phpunit/compare/7.5.15...7.5.16
|
||||
[7.5.15]: https://github.com/sebastianbergmann/phpunit/compare/7.5.14...7.5.15
|
||||
|
||||
2
vendor/phpunit/phpunit/README.md
vendored
2
vendor/phpunit/phpunit/README.md
vendored
@@ -4,7 +4,7 @@ PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of
|
||||
|
||||
[](https://packagist.org/packages/phpunit/phpunit)
|
||||
[](https://php.net/)
|
||||
[](https://phpunit.de/build-status.html)
|
||||
[](https://github.com/sebastianbergmann/phpunit/actions)
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
4
vendor/phpunit/phpunit/phive.xml
vendored
4
vendor/phpunit/phpunit/phive.xml
vendored
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phive xmlns="https://phar.io/phive">
|
||||
<phar name="phpab" version="^1.25" installed="1.25.6" location="./tools/phpab" copy="true"/>
|
||||
<phar name="php-cs-fixer" version="^2.14" installed="2.15.3" location="./tools/php-cs-fixer" copy="true"/>
|
||||
<phar name="phpab" version="^1.25" installed="1.25.8" location="./tools/phpab" copy="true"/>
|
||||
<phar name="php-cs-fixer" version="^2.16" installed="2.16.1" location="./tools/php-cs-fixer" copy="true"/>
|
||||
<phar name="phpdox" version="^0.11" installed="0.12.0" location="./tools/phpdox" copy="true"/>
|
||||
<phar name="phploc" version="^4.0" installed="4.0.1" location="./tools/phploc" copy="true"/>
|
||||
</phive>
|
||||
|
||||
@@ -76,6 +76,7 @@ class TraversableContains extends Constraint
|
||||
return true;
|
||||
}
|
||||
|
||||
/* @noinspection TypeUnsafeComparisonInspection */
|
||||
if (!$this->checkForObjectIdentity && $element == $this->value) {
|
||||
return true;
|
||||
}
|
||||
@@ -86,6 +87,7 @@ class TraversableContains extends Constraint
|
||||
return true;
|
||||
}
|
||||
|
||||
/* @noinspection TypeUnsafeComparisonInspection */
|
||||
if (!$this->checkForNonObjectIdentity && $element == $this->value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -567,15 +567,17 @@ class Generator
|
||||
*
|
||||
* @return \ReflectionMethod[]
|
||||
*/
|
||||
private function getInterfaceOwnMethods(string $interfaceName): array
|
||||
private function userDefinedInterfaceMethods(string $interfaceName): array
|
||||
{
|
||||
$reflect = new ReflectionClass($interfaceName);
|
||||
$methods = [];
|
||||
$interface = new ReflectionClass($interfaceName);
|
||||
$methods = [];
|
||||
|
||||
foreach ($reflect->getMethods() as $method) {
|
||||
if ($method->getDeclaringClass()->getName() === $interfaceName) {
|
||||
$methods[] = $method;
|
||||
foreach ($interface->getMethods() as $method) {
|
||||
if (!$method->isUserDefined()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$methods[] = $method;
|
||||
}
|
||||
|
||||
return $methods;
|
||||
@@ -766,7 +768,7 @@ class Generator
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($this->getInterfaceOwnMethods($mockClassName['fullClassName']) as $method) {
|
||||
foreach ($this->userDefinedInterfaceMethods($mockClassName['fullClassName']) as $method) {
|
||||
$methodName = $method->getName();
|
||||
|
||||
if ($class->hasMethod($methodName)) {
|
||||
@@ -792,7 +794,7 @@ class Generator
|
||||
|
||||
$mockClassName = $this->generateClassName(
|
||||
$actualClassName,
|
||||
'',
|
||||
$mockClassName['className'],
|
||||
'Mock_'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class Version
|
||||
}
|
||||
|
||||
if (self::$version === null) {
|
||||
$version = new VersionId('7.5.17', \dirname(__DIR__, 2));
|
||||
$version = new VersionId('7.5.18', \dirname(__DIR__, 2));
|
||||
self::$version = $version->getVersion();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace PHPUnit\Util\PHP;
|
||||
|
||||
use __PHP_Incomplete_Class;
|
||||
use ErrorException;
|
||||
use PHPUnit\Framework\AssertionFailedError;
|
||||
use PHPUnit\Framework\Exception;
|
||||
use PHPUnit\Framework\SyntheticError;
|
||||
use PHPUnit\Framework\Test;
|
||||
@@ -248,6 +249,14 @@ abstract class AbstractPhpProcess
|
||||
|
||||
$childResult = \unserialize(\str_replace("#!/usr/bin/env php\n", '', $stdout));
|
||||
\restore_error_handler();
|
||||
|
||||
if ($childResult === false) {
|
||||
$result->addFailure(
|
||||
$test,
|
||||
new AssertionFailedError('Test was run in child process and ended unexpectedly'),
|
||||
$time
|
||||
);
|
||||
}
|
||||
} catch (ErrorException $e) {
|
||||
\restore_error_handler();
|
||||
$childResult = false;
|
||||
|
||||
29
vendor/phpunit/phpunit/tests/_files/SeparateProcessesTest.php
vendored
Normal file
29
vendor/phpunit/phpunit/tests/_files/SeparateProcessesTest.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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.
|
||||
*/
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @runTestsInSeparateProcesses
|
||||
*/
|
||||
class SeparateProcessesTest extends TestCase
|
||||
{
|
||||
public function testFoo(): void
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
public function testBar(): void
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
$this->assertTrue(true);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
103
vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/3967.phpt
vendored
Normal file
103
vendor/phpunit/phpunit/tests/end-to-end/mock-objects/generator/3967.phpt
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
--TEST--
|
||||
https://github.com/sebastianbergmann/phpunit/issues/3967
|
||||
--FILE--
|
||||
<?php declare(strict_types=1);
|
||||
interface Bar extends \Throwable
|
||||
{
|
||||
public function foo(): string;
|
||||
}
|
||||
|
||||
interface Baz extends Bar
|
||||
{
|
||||
}
|
||||
|
||||
require __DIR__ . '/../../../../vendor/autoload.php';
|
||||
|
||||
$generator = new \PHPUnit\Framework\MockObject\Generator;
|
||||
|
||||
$mock = $generator->generate(
|
||||
'Baz',
|
||||
[],
|
||||
'MockBaz',
|
||||
true,
|
||||
true
|
||||
);
|
||||
|
||||
print $mock['code'];
|
||||
--EXPECT--
|
||||
class MockBaz extends Exception implements Baz, PHPUnit\Framework\MockObject\MockObject
|
||||
{
|
||||
private $__phpunit_invocationMocker;
|
||||
private $__phpunit_originalObject;
|
||||
private $__phpunit_configurable = ['foo'];
|
||||
private $__phpunit_returnValueGeneration = true;
|
||||
|
||||
|
||||
public function foo(): string
|
||||
{
|
||||
$__phpunit_arguments = [];
|
||||
$__phpunit_count = func_num_args();
|
||||
|
||||
if ($__phpunit_count > 0) {
|
||||
$__phpunit_arguments_tmp = func_get_args();
|
||||
|
||||
for ($__phpunit_i = 0; $__phpunit_i < $__phpunit_count; $__phpunit_i++) {
|
||||
$__phpunit_arguments[] = $__phpunit_arguments_tmp[$__phpunit_i];
|
||||
}
|
||||
}
|
||||
|
||||
$__phpunit_result = $this->__phpunit_getInvocationMocker()->invoke(
|
||||
new \PHPUnit\Framework\MockObject\Invocation\ObjectInvocation(
|
||||
'Bar', 'foo', $__phpunit_arguments, 'string', $this, true
|
||||
)
|
||||
);
|
||||
|
||||
return $__phpunit_result;
|
||||
}
|
||||
|
||||
public function expects(\PHPUnit\Framework\MockObject\Matcher\Invocation $matcher)
|
||||
{
|
||||
return $this->__phpunit_getInvocationMocker()->expects($matcher);
|
||||
}
|
||||
|
||||
public function method()
|
||||
{
|
||||
$any = new \PHPUnit\Framework\MockObject\Matcher\AnyInvokedCount;
|
||||
$expects = $this->expects($any);
|
||||
|
||||
return call_user_func_array([$expects, 'method'], func_get_args());
|
||||
}
|
||||
|
||||
public function __phpunit_setOriginalObject($originalObject)
|
||||
{
|
||||
$this->__phpunit_originalObject = $originalObject;
|
||||
}
|
||||
|
||||
public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration)
|
||||
{
|
||||
$this->__phpunit_returnValueGeneration = $returnValueGeneration;
|
||||
}
|
||||
|
||||
public function __phpunit_getInvocationMocker()
|
||||
{
|
||||
if ($this->__phpunit_invocationMocker === null) {
|
||||
$this->__phpunit_invocationMocker = new \PHPUnit\Framework\MockObject\InvocationMocker($this->__phpunit_configurable, $this->__phpunit_returnValueGeneration);
|
||||
}
|
||||
|
||||
return $this->__phpunit_invocationMocker;
|
||||
}
|
||||
|
||||
public function __phpunit_hasMatchers()
|
||||
{
|
||||
return $this->__phpunit_getInvocationMocker()->hasMatchers();
|
||||
}
|
||||
|
||||
public function __phpunit_verify(bool $unsetInvocationMocker = true)
|
||||
{
|
||||
$this->__phpunit_getInvocationMocker()->verify();
|
||||
|
||||
if ($unsetInvocationMocker) {
|
||||
$this->__phpunit_invocationMocker = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
26
vendor/phpunit/phpunit/tests/end-to-end/separate-processes-test.phpt
vendored
Normal file
26
vendor/phpunit/phpunit/tests/end-to-end/separate-processes-test.phpt
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
phpunit --no-configuration ../../_files/SeparateProcessesTest.php
|
||||
--FILE--
|
||||
<?php declare(strict_types=1);
|
||||
$_SERVER['argv'][1] = '--no-configuration';
|
||||
$_SERVER['argv'][2] = __DIR__ . '/../_files/SeparateProcessesTest.php';
|
||||
|
||||
require __DIR__ . '/../bootstrap.php';
|
||||
PHPUnit\TextUI\Command::main();
|
||||
--EXPECTF--
|
||||
PHPUnit %s by Sebastian Bergmann and contributors.
|
||||
|
||||
FF 2 / 2 (100%)
|
||||
|
||||
Time: %s, Memory: %s
|
||||
|
||||
There were 2 failures:
|
||||
|
||||
1) SeparateProcessesTest::testFoo
|
||||
Test was run in child process and ended unexpectedly
|
||||
|
||||
2) SeparateProcessesTest::testBar
|
||||
Test was run in child process and ended unexpectedly
|
||||
|
||||
FAILURES!
|
||||
Tests: 2, Assertions: 0, Failures: 2.
|
||||
Reference in New Issue
Block a user