composer update
This commit is contained in:
12
vendor/phpunit/phpunit/ChangeLog-7.5.md
vendored
12
vendor/phpunit/phpunit/ChangeLog-7.5.md
vendored
@@ -2,6 +2,17 @@
|
||||
|
||||
All notable changes of the PHPUnit 7.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [7.5.12] - 2019-05-28
|
||||
|
||||
### Changed
|
||||
|
||||
* After each test, `libxml_clear_errors()` is now called to clear the libxml error buffer
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#3694](https://github.com/sebastianbergmann/phpunit/pull/3694): Constructor arguments for `Throwable` and `Exception` are ignored
|
||||
* Fixed [#3709](https://github.com/sebastianbergmann/phpunit/pull/3709): Method-level `@coversNothing` annotation does not prevent code coverage data collection
|
||||
|
||||
## [7.5.11] - 2019-05-14
|
||||
|
||||
### Fixed
|
||||
@@ -108,6 +119,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.12]: https://github.com/sebastianbergmann/phpunit/compare/7.5.11...7.5.12
|
||||
[7.5.11]: https://github.com/sebastianbergmann/phpunit/compare/7.5.10...7.5.11
|
||||
[7.5.10]: https://github.com/sebastianbergmann/phpunit/compare/7.5.9...7.5.10
|
||||
[7.5.9]: https://github.com/sebastianbergmann/phpunit/compare/7.5.8...7.5.9
|
||||
|
||||
59
vendor/phpunit/phpunit/appveyor.yml
vendored
59
vendor/phpunit/phpunit/appveyor.yml
vendored
@@ -1,59 +0,0 @@
|
||||
build: false
|
||||
clone_folder: c:\phpunit
|
||||
max_jobs: 3
|
||||
platform: x86
|
||||
pull_requests:
|
||||
do_not_increment_build_number: true
|
||||
version: '{build}.{branch}'
|
||||
|
||||
environment:
|
||||
COMPOSER_ROOT_VERSION: '7.0-dev'
|
||||
|
||||
matrix:
|
||||
- PHP_VERSION: '7.1'
|
||||
XDEBUG_VERSION: '2.5.5-7.1'
|
||||
DEPENDENCIES: '--prefer-lowest'
|
||||
- PHP_VERSION: '7.1'
|
||||
XDEBUG_VERSION: '2.5.5-7.1'
|
||||
DEPENDENCIES: ''
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
cache:
|
||||
- c:\php -> appveyor.yml
|
||||
- '%LOCALAPPDATA%\Composer\files'
|
||||
|
||||
init:
|
||||
- SET PATH=c:\php\%PHP_VERSION%;%PATH%
|
||||
|
||||
install:
|
||||
- IF NOT EXIST c:\php mkdir c:\php
|
||||
- IF NOT EXIST c:\php\%PHP_VERSION% mkdir c:\php\%PHP_VERSION%
|
||||
- cd c:\php\%PHP_VERSION%
|
||||
- IF NOT EXIST php-installed.txt curl -fsS -o php-%PHP_VERSION%-Win32-VC14-x86.zip https://windows.php.net/downloads/releases/latest/php-%PHP_VERSION%-Win32-VC14-x86-latest.zip
|
||||
- IF NOT EXIST php-installed.txt 7z x php-%PHP_VERSION%-Win32-VC14-x86.zip -y >nul
|
||||
- IF NOT EXIST php-installed.txt del /Q *.zip
|
||||
- IF NOT EXIST php-installed.txt copy /Y php.ini-development php.ini
|
||||
- IF NOT EXIST php-installed.txt echo max_execution_time=1200 >> php.ini
|
||||
- IF NOT EXIST php-installed.txt echo date.timezone="UTC" >> php.ini
|
||||
- IF NOT EXIST php-installed.txt echo extension_dir=ext >> php.ini
|
||||
- IF NOT EXIST php-installed.txt echo extension=php_curl.dll >> php.ini
|
||||
- IF NOT EXIST php-installed.txt echo extension=php_openssl.dll >> php.ini
|
||||
- IF NOT EXIST php-installed.txt echo extension=php_mbstring.dll >> php.ini
|
||||
- IF NOT EXIST php-installed.txt echo extension=php_fileinfo.dll >> php.ini
|
||||
- IF NOT EXIST php-installed.txt echo extension=php_mysqli.dll >> php.ini
|
||||
- IF NOT EXIST php-installed.txt echo extension=php_pdo_sqlite.dll >> php.ini
|
||||
- IF NOT EXIST php-installed.txt echo zend.assertions=1 >> php.ini
|
||||
- IF NOT EXIST php-installed.txt echo assert.exception=On >> php.ini
|
||||
- IF NOT EXIST php-installed.txt curl -fsS -o composer.phar https://getcomposer.org/composer.phar
|
||||
- IF NOT EXIST php-installed.txt echo @php %%~dp0composer.phar %%* > composer.bat
|
||||
- IF NOT EXIST php-installed.txt curl -fsS -o c:\php\%PHP_VERSION%\ext\php_xdebug-%XDEBUG_VERSION%-vc14.dll https://xdebug.org/files/php_xdebug-%XDEBUG_VERSION%-vc14.dll
|
||||
- IF NOT EXIST php-installed.txt echo zend_extension=php_xdebug-%XDEBUG_VERSION%-vc14.dll >> php.ini
|
||||
- IF NOT EXIST php-installed.txt type nul >> php-installed.txt
|
||||
- cd c:\phpunit
|
||||
- composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable %DEPENDENCIES%
|
||||
|
||||
test_script:
|
||||
- cd c:\phpunit
|
||||
- php phpunit
|
||||
2
vendor/phpunit/phpunit/phive.xml
vendored
2
vendor/phpunit/phpunit/phive.xml
vendored
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phive xmlns="https://phar.io/phive">
|
||||
<phar name="phpab" version="^1.25" installed="1.25.5" location="./tools/phpab" copy="true"/>
|
||||
<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.0" 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"/>
|
||||
|
||||
@@ -593,9 +593,7 @@ class Generator
|
||||
{
|
||||
$this->evalClass($code, $className);
|
||||
|
||||
if ($callOriginalConstructor &&
|
||||
\is_string($type) &&
|
||||
!\interface_exists($type, $callAutoload)) {
|
||||
if ($callOriginalConstructor) {
|
||||
if (\count($arguments) === 0) {
|
||||
$object = new $className;
|
||||
} else {
|
||||
|
||||
@@ -916,6 +916,7 @@ abstract class TestCase extends Assert implements SelfDescribing, Test
|
||||
$this->unregisterCustomComparators();
|
||||
$this->cleanupIniSettings();
|
||||
$this->cleanupLocaleSettings();
|
||||
\libxml_clear_errors();
|
||||
|
||||
// Perform assertion on output.
|
||||
if (!isset($e)) {
|
||||
|
||||
@@ -198,6 +198,12 @@ class TestResult implements Countable
|
||||
{
|
||||
$annotations = $test->getAnnotations();
|
||||
|
||||
// If there is a @coversNothing annotation on the test method then code
|
||||
// coverage data does not need to be collected
|
||||
if (isset($annotations['method']['coversNothing'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If any methods have covers, coverage must me generated
|
||||
if (isset($annotations['method']['covers'])) {
|
||||
return true;
|
||||
|
||||
@@ -21,22 +21,49 @@ use SebastianBergmann\FileIterator\Facade as FileIteratorFacade;
|
||||
*/
|
||||
abstract class BaseTestRunner
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public const STATUS_UNKNOWN = -1;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public const STATUS_PASSED = 0;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public const STATUS_SKIPPED = 1;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public const STATUS_INCOMPLETE = 2;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public const STATUS_FAILURE = 3;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public const STATUS_ERROR = 4;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public const STATUS_RISKY = 5;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public const STATUS_WARNING = 6;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const SUITE_METHODNAME = 'suite';
|
||||
|
||||
/**
|
||||
@@ -52,7 +79,7 @@ abstract class BaseTestRunner
|
||||
* This is a template method, subclasses override
|
||||
* the runFailed() and clearStatus() methods.
|
||||
*
|
||||
* @param array|string $suffixes
|
||||
* @param string|string[] $suffixes
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ class Version
|
||||
}
|
||||
|
||||
if (self::$version === null) {
|
||||
$version = new VersionId('7.5.11', \dirname(__DIR__, 2));
|
||||
$version = new VersionId('7.5.12', \dirname(__DIR__, 2));
|
||||
self::$version = $version->getVersion();
|
||||
}
|
||||
|
||||
|
||||
22
vendor/phpunit/phpunit/tests/_files/CoverageClassNothingTest.php
vendored
Normal file
22
vendor/phpunit/phpunit/tests/_files/CoverageClassNothingTest.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* @coversNothing
|
||||
*/
|
||||
class CoverageClassNothingTest extends TestCase
|
||||
{
|
||||
public function testSomething(): void
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
||||
19
vendor/phpunit/phpunit/tests/_files/CoverageClassWithoutAnnotationsTest.php
vendored
Normal file
19
vendor/phpunit/phpunit/tests/_files/CoverageClassWithoutAnnotationsTest.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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;
|
||||
|
||||
class CoverageClassWithoutAnnotationsTest extends TestCase
|
||||
{
|
||||
public function testSomething(): void
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class CoverageNothingTest extends TestCase
|
||||
class CoverageMethodNothingCoversMethod extends TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass::publicMethod
|
||||
22
vendor/phpunit/phpunit/tests/_files/CoverageMethodNothingTest.php
vendored
Normal file
22
vendor/phpunit/phpunit/tests/_files/CoverageMethodNothingTest.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/*
|
||||
* 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;
|
||||
|
||||
class CoverageMethodNothingTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @coversNothing
|
||||
*/
|
||||
public function testSomething(): void
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
||||
@@ -220,6 +220,12 @@ class GeneratorTest extends TestCase
|
||||
$this->assertInstanceOf(MockObject::class, $stub);
|
||||
}
|
||||
|
||||
public function testMockingOfThrowableConstructorArguments(): void
|
||||
{
|
||||
$mock = $this->generator->getMock(Throwable::class, null, ['It works']);
|
||||
$this->assertSame('It works', $mock->getMessage());
|
||||
}
|
||||
|
||||
public function testVariadicArgumentsArePassedToOriginalMethod()
|
||||
{
|
||||
/** @var ClassWithVariadicArgumentMethod|MockObject $mock */
|
||||
|
||||
@@ -66,9 +66,11 @@ class TestResultTest extends TestCase
|
||||
public function canSkipCoverageProvider(): array
|
||||
{
|
||||
return [
|
||||
['CoverageClassTest', true],
|
||||
['CoverageNothingTest', true],
|
||||
['CoverageClassTest', false],
|
||||
['CoverageClassWithoutAnnotationsTest', false],
|
||||
['CoverageCoversOverridesCoversNothingTest', false],
|
||||
['CoverageClassNothingTest', true],
|
||||
['CoverageMethodNothingTest', true],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -79,8 +81,10 @@ class TestResultTest extends TestCase
|
||||
{
|
||||
require_once TEST_FILES_PATH . $testCase . '.php';
|
||||
|
||||
$test = new $testCase;
|
||||
$canSkipCoverage = TestResult::isAnyCoverageRequired($test);
|
||||
$test = new $testCase('testSomething');
|
||||
$coverageRequired = TestResult::isAnyCoverageRequired($test);
|
||||
$canSkipCoverage = !$coverageRequired;
|
||||
|
||||
$this->assertEquals($expectedCanSkip, $canSkipCoverage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -782,11 +782,15 @@ class TestTest extends TestCase
|
||||
$expected = [
|
||||
TEST_FILES_PATH . 'NamespaceCoveredClass.php' => $lines,
|
||||
];
|
||||
} elseif ($test === 'CoverageMethodNothingCoversMethod') {
|
||||
$expected = false;
|
||||
} elseif ($test === 'CoverageCoversOverridesCoversNothingTest') {
|
||||
$expected = [TEST_FILES_PATH . 'CoveredClass.php' => $lines];
|
||||
} elseif ($test === 'CoverageNoneTest') {
|
||||
$expected = [];
|
||||
} elseif ($test === 'CoverageNothingTest') {
|
||||
} elseif ($test === 'CoverageClassNothingTest') {
|
||||
$expected = false;
|
||||
} elseif ($test === 'CoverageMethodNothingTest') {
|
||||
$expected = false;
|
||||
} elseif ($test === 'CoverageFunctionTest') {
|
||||
$expected = [
|
||||
@@ -1009,13 +1013,21 @@ class TestTest extends TestCase
|
||||
\range(31, 35),
|
||||
],
|
||||
[
|
||||
'CoverageNothingTest',
|
||||
'CoverageClassNothingTest',
|
||||
false,
|
||||
],
|
||||
[
|
||||
'CoverageMethodNothingTest',
|
||||
false,
|
||||
],
|
||||
[
|
||||
'CoverageCoversOverridesCoversNothingTest',
|
||||
\range(29, 33),
|
||||
],
|
||||
[
|
||||
'CoverageMethodNothingCoversMethod',
|
||||
false,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user