License updated to GPLv3

🧲 New features
Custom user role permissions
Employee edit form updated
Employee daily task list
Attendance and employee distribution charts on dashboard
Improvements to company structure and company assets module
Improved tables for displaying data in several modules
Faster data loading (specially for employee module)
Initials based profile pictures
Re-designed login page
Re-designed user profile page
Improvements to filtering
New REST endpoints for employee qualifications

🐛 Bug fixes
Fixed, issue with managers being able to create performance reviews for employees who are not their direct reports
Fixed, issues related to using full profile image instead of using smaller version of profile image
Changing third gender to other
Improvements and fixes for internal frontend data caching
This commit is contained in:
Thilina Pituwala
2020-10-31 19:02:37 +01:00
parent 86b8345505
commit b1df0037db
29343 changed files with 867614 additions and 2191082 deletions

View File

@@ -2,6 +2,22 @@
All notable changes of the PHP_CodeCoverage 5.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
## [5.3.2] - 2018-04-06
### Fixed
* Fixed [#602](https://github.com/sebastianbergmann/php-code-coverage/pull/602): Regression introduced in version 5.3.1
## [5.3.1] - 2018-04-06
### Changed
* `Clover`, `Crap4j`, and `PHP` report writers now raise an exception when their call to `file_put_contents()` fails
### Fixed
* Fixed [#559](https://github.com/sebastianbergmann/php-code-coverage/issues/559): Ignored classes and methods are reported as 100% covered
## [5.3.0] - 2017-12-06
### Added
@@ -12,5 +28,7 @@ All notable changes of the PHP_CodeCoverage 5.3 release series are documented in
* Fixed [#564](https://github.com/sebastianbergmann/php-code-coverage/issues/564): `setDisableIgnoredLines(true)` disables more than it should
[5.3.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/5.3.1...5.3.2
[5.3.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/5.3.0...5.3.1
[5.3.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/5.2...5.3.0

View File

@@ -12,6 +12,7 @@ namespace SebastianBergmann\CodeCoverage\Report;
use SebastianBergmann\CodeCoverage\CodeCoverage;
use SebastianBergmann\CodeCoverage\Node\File;
use SebastianBergmann\CodeCoverage\RuntimeException;
/**
* Generates a Clover XML logfile from a code coverage object.
@@ -24,6 +25,8 @@ class Clover
* @param string $name
*
* @return string
*
* @throws \SebastianBergmann\CodeCoverage\RuntimeException
*/
public function process(CodeCoverage $coverage, $target = null, $name = null)
{
@@ -243,7 +246,14 @@ class Clover
\mkdir(\dirname($target), 0777, true);
}
\file_put_contents($target, $buffer);
if (@\file_put_contents($target, $buffer) === false) {
throw new RuntimeException(
\sprintf(
'Could not write to "%s',
$target
)
);
}
}
return $buffer;

View File

@@ -13,6 +13,7 @@ namespace SebastianBergmann\CodeCoverage\Report;
use SebastianBergmann\CodeCoverage\CodeCoverage;
use SebastianBergmann\CodeCoverage\InvalidArgumentException;
use SebastianBergmann\CodeCoverage\Node\File;
use SebastianBergmann\CodeCoverage\RuntimeException;
class Crap4j
{
@@ -42,6 +43,8 @@ class Crap4j
* @param string $name
*
* @return string
*
* @throws \SebastianBergmann\CodeCoverage\RuntimeException
*/
public function process(CodeCoverage $coverage, $target = null, $name = null)
{
@@ -135,7 +138,14 @@ class Crap4j
\mkdir(\dirname($target), 0777, true);
}
\file_put_contents($target, $buffer);
if (@\file_put_contents($target, $buffer) === false) {
throw new RuntimeException(
\sprintf(
'Could not write to "%s',
$target
)
);
}
}
return $buffer;

View File

@@ -131,19 +131,23 @@ class File extends Renderer
*/
protected function renderTraitOrClassItems(array $items, \Text_Template $template, \Text_Template $methodItemTemplate)
{
if (empty($items)) {
return '';
}
$buffer = '';
if (empty($items)) {
return $buffer;
}
foreach ($items as $name => $item) {
$numMethods = \count($item['methods']);
$numMethods = 0;
$numTestedMethods = 0;
foreach ($item['methods'] as $method) {
if ($method['executedLines'] == $method['executableLines']) {
$numTestedMethods++;
if ($method['executableLines'] > 0) {
$numMethods++;
if ($method['executedLines'] === $method['executableLines']) {
$numTestedMethods++;
}
}
}
@@ -244,7 +248,16 @@ class File extends Renderer
*/
protected function renderFunctionOrMethodItem(\Text_Template $template, array $item, $indent = '')
{
$numTestedItems = $item['executedLines'] == $item['executableLines'] ? 1 : 0;
$numMethods = 0;
$numTestedMethods = 0;
if ($item['executableLines'] > 0) {
$numMethods = 1;
if ($item['executedLines'] === $item['executableLines']) {
$numTestedMethods = 1;
}
}
return $this->renderItemTemplate(
$template,
@@ -256,8 +269,8 @@ class File extends Renderer
\htmlspecialchars($item['signature']),
isset($item['functionName']) ? $item['functionName'] : $item['methodName']
),
'numMethods' => 1,
'numTestedMethods' => $numTestedItems,
'numMethods' => $numMethods,
'numTestedMethods' => $numTestedMethods,
'linesExecutedPercent' => Util::percent(
$item['executedLines'],
$item['executableLines'],
@@ -271,12 +284,12 @@ class File extends Renderer
'numExecutedLines' => $item['executedLines'],
'numExecutableLines' => $item['executableLines'],
'testedMethodsPercent' => Util::percent(
$numTestedItems,
$numTestedMethods,
1,
false
),
'testedMethodsPercentAsString' => Util::percent(
$numTestedItems,
$numTestedMethods,
1,
true
),

View File

@@ -11,6 +11,7 @@
namespace SebastianBergmann\CodeCoverage\Report;
use SebastianBergmann\CodeCoverage\CodeCoverage;
use SebastianBergmann\CodeCoverage\RuntimeException;
/**
* Uses var_export() to write a SebastianBergmann\CodeCoverage\CodeCoverage object to a file.
@@ -27,7 +28,7 @@ class PHP
{
$filter = $coverage->filter();
$output = \sprintf(
$buffer = \sprintf(
'<?php
$coverage = new SebastianBergmann\CodeCoverage\CodeCoverage;
$coverage->setData(%s);
@@ -43,9 +44,16 @@ return $coverage;',
);
if ($target !== null) {
return \file_put_contents($target, $output);
} else {
return $output;
if (@\file_put_contents($target, $buffer) === false) {
throw new RuntimeException(
\sprintf(
'Could not write to "%s',
$target
)
);
}
}
return $buffer;
}
}

View File

@@ -22,7 +22,7 @@ class Version
public static function id()
{
if (self::$version === null) {
$version = new VersionId('5.3.0', \dirname(__DIR__));
$version = new VersionId('5.3.2', \dirname(__DIR__));
self::$version = $version->getVersion();
}

View File

@@ -65,16 +65,11 @@
</tr>
<tr>
<td class="success" colspan="4"><a href="#28"><abbr title="baz()">baz</abbr></a></td>
<td class="success big"> <div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100.00" aria-valuemin="0" aria-valuemax="100" style="width: 100.00%">
<span class="sr-only">100.00% covered (success)</span>
</div>
</div>
</td>
<td class="success small"><div align="right">100.00%</div></td>
<td class="success small"><div align="right">1&nbsp;/&nbsp;1</div></td>
<td class="success small">1</td>
<td class="" colspan="4"><a href="#28"><abbr title="baz()">baz</abbr></a></td>
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>
<td class=" small">1</td>
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>
@@ -85,31 +80,21 @@
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>
<td class="success big"> <div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100.00" aria-valuemin="0" aria-valuemax="100" style="width: 100.00%">
<span class="sr-only">100.00% covered (success)</span>
</div>
</div>
</td>
<td class="success small"><div align="right">100.00%</div></td>
<td class="success small"><div align="right">1&nbsp;/&nbsp;1</div></td>
<td class="success small">1</td>
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>
<td class=" small">1</td>
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>
</tr>
<tr>
<td class="success" colspan="4">&nbsp;<a href="#13"><abbr title="bar()">bar</abbr></a></td>
<td class="success big"> <div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100.00" aria-valuemin="0" aria-valuemax="100" style="width: 100.00%">
<span class="sr-only">100.00% covered (success)</span>
</div>
</div>
</td>
<td class="success small"><div align="right">100.00%</div></td>
<td class="success small"><div align="right">1&nbsp;/&nbsp;1</div></td>
<td class="success small">1</td>
<td class="" colspan="4">&nbsp;<a href="#13"><abbr title="bar()">bar</abbr></a></td>
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>
<td class=" small">1</td>
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>
@@ -120,31 +105,21 @@
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>
<td class="success big"> <div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100.00" aria-valuemin="0" aria-valuemax="100" style="width: 100.00%">
<span class="sr-only">100.00% covered (success)</span>
</div>
</div>
</td>
<td class="success small"><div align="right">100.00%</div></td>
<td class="success small"><div align="right">1&nbsp;/&nbsp;1</div></td>
<td class="success small">1</td>
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>
<td class=" small">1</td>
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>
</tr>
<tr>
<td class="success" colspan="4">&nbsp;<a href="#23"><abbr title="foo()">foo</abbr></a></td>
<td class="success big"> <div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100.00" aria-valuemin="0" aria-valuemax="100" style="width: 100.00%">
<span class="sr-only">100.00% covered (success)</span>
</div>
</div>
</td>
<td class="success small"><div align="right">100.00%</div></td>
<td class="success small"><div align="right">1&nbsp;/&nbsp;1</div></td>
<td class="success small">1</td>
<td class="" colspan="4">&nbsp;<a href="#23"><abbr title="foo()">foo</abbr></a></td>
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>
<td class=" small">1</td>
<td class=" big"></td>
<td class=" small"><div align="right">n/a</div></td>
<td class=" small"><div align="right">0&nbsp;/&nbsp;0</div></td>

View File

@@ -26,7 +26,7 @@
"sebastian/exporter": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "^6.5"
"phpunit/phpunit": "^6.5.11"
},
"conflict": {
"phpunit/phpunit": "<6.0"

View File

@@ -1115,8 +1115,16 @@ class Generator
if (!$parameter->isVariadic()) {
if ($parameter->isDefaultValueAvailable()) {
$value = $parameter->getDefaultValue();
$default = ' = ' . \var_export($value, true);
$value = $parameter->getDefaultValueConstantName();
if ($value === null) {
$value = \var_export($parameter->getDefaultValue(), true);
} elseif (!\defined($value)) {
$rootValue = \preg_replace('/^.*\\\\/', '', $value);
$value = \defined($rootValue) ? $rootValue : $value;
}
$default = ' = ' . $value;
} elseif ($parameter->isOptional()) {
$default = ' = null';
}

View File

@@ -0,0 +1,112 @@
--TEST--
https://github.com/sebastianbergmann/phpunit-mock-objects/issues/420
https://github.com/sebastianbergmann/phpunit/issues/3154
--FILE--
<?php
namespace Is\Namespaced;
/*
* 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.
*/
const A_CONSTANT = 17;
const PHP_VERSION = "0.0.0";
class Issue3154
{
public function a(int $i = PHP_INT_MAX, int $j = A_CONSTANT, string $v = \PHP_VERSION, string $z = '#'): string
{
return $z."sum: ".($i+$j).$v;
}
}
require __DIR__ . '/../../vendor/autoload.php';
$generator = new \PHPUnit\Framework\MockObject\Generator;
$mock = $generator->generate(
Issue3154::class,
[],
'Issue3154Mock',
true,
true
);
print $mock['code'];
--EXPECT--
class Issue3154Mock extends Is\Namespaced\Issue3154 implements PHPUnit\Framework\MockObject\MockObject
{
private $__phpunit_invocationMocker;
private $__phpunit_originalObject;
private $__phpunit_configurable = ['a'];
public function __clone()
{
$this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
}
public function a(int $i = PHP_INT_MAX, int $j = Is\Namespaced\A_CONSTANT, string $v = PHP_VERSION, string $z = '#'): string
{
$arguments = array($i, $j, $v, $z);
$count = func_num_args();
if ($count > 4) {
$_arguments = func_get_args();
for ($i = 4; $i < $count; $i++) {
$arguments[] = $_arguments[$i];
}
}
$result = $this->__phpunit_getInvocationMocker()->invoke(
new \PHPUnit\Framework\MockObject\Invocation\ObjectInvocation(
'Is\Namespaced\Issue3154', 'a', $arguments, 'string', $this, true
)
);
return $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(array($expects, 'method'), func_get_args());
}
public function __phpunit_setOriginalObject($originalObject)
{
$this->__phpunit_originalObject = $originalObject;
}
public function __phpunit_getInvocationMocker()
{
if ($this->__phpunit_invocationMocker === null) {
$this->__phpunit_invocationMocker = new \PHPUnit\Framework\MockObject\InvocationMocker($this->__phpunit_configurable);
}
return $this->__phpunit_invocationMocker;
}
public function __phpunit_hasMatchers()
{
return $this->__phpunit_getInvocationMocker()->hasMatchers();
}
public function __phpunit_verify($unsetInvocationMocker = true)
{
$this->__phpunit_getInvocationMocker()->verify();
if ($unsetInvocationMocker) {
$this->__phpunit_invocationMocker = null;
}
}
}

View File

@@ -1,5 +1,8 @@
--TEST--
https://github.com/sebastianbergmann/phpunit-mock-objects/issues/397
--SKIPIF--
<?php
if (!version_compare(PHP_VERSION, '7.1', '>=')) print 'skip: PHP >= 7.1 required';
--FILE--
<?php
class C

View File

@@ -0,0 +1,99 @@
--TEST--
\PHPUnit\Framework\MockObject\Generator::generate('Foo', [], 'MockFoo', true, true)
--FILE--
<?php
class Foo
{
public function bar(int $baz = PHP_INT_MIN)
{
}
}
require __DIR__ . '/../../vendor/autoload.php';
$generator = new \PHPUnit\Framework\MockObject\Generator;
$mock = $generator->generate(
'Foo',
[],
'MockFoo',
true,
true
);
print $mock['code'];
?>
--EXPECT--
class MockFoo extends Foo implements PHPUnit\Framework\MockObject\MockObject
{
private $__phpunit_invocationMocker;
private $__phpunit_originalObject;
private $__phpunit_configurable = ['bar'];
public function __clone()
{
$this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
}
public function bar(int $baz = PHP_INT_MIN)
{
$arguments = array($baz);
$count = func_num_args();
if ($count > 1) {
$_arguments = func_get_args();
for ($i = 1; $i < $count; $i++) {
$arguments[] = $_arguments[$i];
}
}
$result = $this->__phpunit_getInvocationMocker()->invoke(
new \PHPUnit\Framework\MockObject\Invocation\ObjectInvocation(
'Foo', 'bar', $arguments, '', $this, true
)
);
return $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(array($expects, 'method'), func_get_args());
}
public function __phpunit_setOriginalObject($originalObject)
{
$this->__phpunit_originalObject = $originalObject;
}
public function __phpunit_getInvocationMocker()
{
if ($this->__phpunit_invocationMocker === null) {
$this->__phpunit_invocationMocker = new \PHPUnit\Framework\MockObject\InvocationMocker($this->__phpunit_configurable);
}
return $this->__phpunit_invocationMocker;
}
public function __phpunit_hasMatchers()
{
return $this->__phpunit_getInvocationMocker()->hasMatchers();
}
public function __phpunit_verify($unsetInvocationMocker = true)
{
$this->__phpunit_getInvocationMocker()->verify();
if ($unsetInvocationMocker) {
$this->__phpunit_invocationMocker = null;
}
}
}

View File

@@ -941,6 +941,16 @@ class MockObjectTest extends TestCase
$this->assertEquals(get_class($a), get_class($b));
}
/**
* @requires extension soap
*/
public function testCreateMockOfWsdlFileWithSpecialChars()
{
$mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/Go ogle-Sea.rch.wsdl');
$this->assertStringStartsWith('Mock_GoogleSearch_', get_class($mock));
}
/**
* @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/156
* @ticket 156

View File

@@ -0,0 +1,198 @@
<?xml version="1.0"?>
<!-- WSDL description of the Google Web APIs.
The Google Web APIs are in beta release. All interfaces are subject to
change as we refine and extend our APIs. Please see the terms of use
for more information. -->
<!-- Revision 2002-08-16 -->
<definitions name="GoogleSearch"
targetNamespace="urn:GoogleSearch"
xmlns:typens="urn:GoogleSearch"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<!-- Types for search - result elements, directory categories -->
<types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:GoogleSearch">
<xsd:complexType name="GoogleSearchResult">
<xsd:all>
<xsd:element name="documentFiltering" type="xsd:boolean"/>
<xsd:element name="searchComments" type="xsd:string"/>
<xsd:element name="estimatedTotalResultsCount" type="xsd:int"/>
<xsd:element name="estimateIsExact" type="xsd:boolean"/>
<xsd:element name="resultElements" type="typens:ResultElementArray"/>
<xsd:element name="searchQuery" type="xsd:string"/>
<xsd:element name="startIndex" type="xsd:int"/>
<xsd:element name="endIndex" type="xsd:int"/>
<xsd:element name="searchTips" type="xsd:string"/>
<xsd:element name="directoryCategories" type="typens:DirectoryCategoryArray"/>
<xsd:element name="searchTime" type="xsd:double"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="ResultElement">
<xsd:all>
<xsd:element name="summary" type="xsd:string"/>
<xsd:element name="URL" type="xsd:string"/>
<xsd:element name="snippet" type="xsd:string"/>
<xsd:element name="title" type="xsd:string"/>
<xsd:element name="cachedSize" type="xsd:string"/>
<xsd:element name="relatedInformationPresent" type="xsd:boolean"/>
<xsd:element name="hostName" type="xsd:string"/>
<xsd:element name="directoryCategory" type="typens:DirectoryCategory"/>
<xsd:element name="directoryTitle" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="ResultElementArray">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:ResultElement[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="DirectoryCategoryArray">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:DirectoryCategory[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="DirectoryCategory">
<xsd:all>
<xsd:element name="fullViewableName" type="xsd:string"/>
<xsd:element name="specialEncoding" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
</xsd:schema>
</types>
<!-- Messages for Google Web APIs - cached page, search, spelling. -->
<message name="doGetCachedPage">
<part name="key" type="xsd:string"/>
<part name="url" type="xsd:string"/>
</message>
<message name="doGetCachedPageResponse">
<part name="return" type="xsd:base64Binary"/>
</message>
<message name="doSpellingSuggestion">
<part name="key" type="xsd:string"/>
<part name="phrase" type="xsd:string"/>
</message>
<message name="doSpellingSuggestionResponse">
<part name="return" type="xsd:string"/>
</message>
<!-- note, ie and oe are ignored by server; all traffic is UTF-8. -->
<message name="doGoogleSearch">
<part name="key" type="xsd:string"/>
<part name="q" type="xsd:string"/>
<part name="start" type="xsd:int"/>
<part name="maxResults" type="xsd:int"/>
<part name="filter" type="xsd:boolean"/>
<part name="restrict" type="xsd:string"/>
<part name="safeSearch" type="xsd:boolean"/>
<part name="lr" type="xsd:string"/>
<part name="ie" type="xsd:string"/>
<part name="oe" type="xsd:string"/>
</message>
<message name="doGoogleSearchResponse">
<part name="return" type="typens:GoogleSearchResult"/>
</message>
<!-- Port for Google Web APIs, "GoogleSearch" -->
<portType name="GoogleSearchPort">
<operation name="doGetCachedPage">
<input message="typens:doGetCachedPage"/>
<output message="typens:doGetCachedPageResponse"/>
</operation>
<operation name="doSpellingSuggestion">
<input message="typens:doSpellingSuggestion"/>
<output message="typens:doSpellingSuggestionResponse"/>
</operation>
<operation name="doGoogleSearch">
<input message="typens:doGoogleSearch"/>
<output message="typens:doGoogleSearchResponse"/>
</operation>
</portType>
<!-- Binding for Google Web APIs - RPC, SOAP over HTTP -->
<binding name="GoogleSearchBinding" type="typens:GoogleSearchPort">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="doGetCachedPage">
<soap:operation soapAction="urn:GoogleSearchAction"/>
<input>
<soap:body use="encoded"
namespace="urn:GoogleSearch"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urn:GoogleSearch"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="doSpellingSuggestion">
<soap:operation soapAction="urn:GoogleSearchAction"/>
<input>
<soap:body use="encoded"
namespace="urn:GoogleSearch"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urn:GoogleSearch"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="doGoogleSearch">
<soap:operation soapAction="urn:GoogleSearchAction"/>
<input>
<soap:body use="encoded"
namespace="urn:GoogleSearch"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urn:GoogleSearch"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<!-- Endpoint for Google Web APIs -->
<service name="GoogleSearchService">
<port name="GoogleSearchPort" binding="typens:GoogleSearchBinding">
<soap:address location="http://api.google.com/search/beta2"/>
</port>
</service>
</definitions>

View File

@@ -13,7 +13,7 @@ Please note that this project is released with a [Contributor Code of Conduct](C
Please make sure that you have [set up your user name and email address](http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name <root@localhost>` look really stupid in the commit history of a project.
Pull requests for bug fixes must be based on the current stable branch whereas pull requests for new features must be based on the `master` branch.
Pull requests for bug fixes must be made for the oldest branch that is [supported](https://phpunit.de/supported-versions.html). Pull requests for new features must be based on the `master` branch.
We are trying to keep backwards compatibility breaks in PHPUnit to an absolute minimum. Please take this into account when proposing changes.
@@ -21,12 +21,10 @@ Due to time constraints, we are not always able to respond as quickly as we woul
## Coding Guidelines
This project comes with a configuration file for [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (`.php_cs`) that you can use to (re)format your sourcecode for compliance with this project's coding guidelines:
This project comes with a configuration file and an executable for [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) (`.php_cs`) that you can use to (re)format your sourcecode for compliance with this project's coding guidelines:
```bash
$ wget http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -O php-cs-fixer.phar
$ php php-cs-fixer.phar fix
$ ./build/tools/php-cs-fixer fix
```
## Using PHPUnit from a Git checkout

View File

@@ -7,7 +7,7 @@
<!--
- Please fill in this template according to your issue.
- Please keep the table shown above at the top of your issue.
- Please include the output of "composer info -D | sort" if you installed PHPUnit using Composer.
- Please include the output of "composer info | sort" if you installed PHPUnit using Composer.
- Please post code as text (using proper markup). Do not post screenshots of code.
- Visit https://phpunit.de/support.html if you are looking for support.
- Otherwise, replace this comment by the description of your issue.

View File

@@ -1,5 +1,8 @@
/.ant_targets
/.idea
/.php_cs
/.php_cs.cache
/.phpunit.result.cache
/build/documentation
/build/logfiles
/build/phar
@@ -7,12 +10,12 @@
/build/*.phar
/build/*.phar.asc
/build/binary-phar-autoload.php
/tests/TextUI/*.diff
/tests/TextUI/*.exp
/tests/TextUI/*.log
/tests/TextUI/*.out
/tests/TextUI/*.php
/cache.properties
/composer.lock
/tests/end-to-end/*.diff
/tests/end-to-end/*.exp
/tests/end-to-end/*.log
/tests/end-to-end/*.out
/tests/end-to-end/*.php
/vendor
/.php_cs.cache

View File

@@ -66,7 +66,7 @@ return PhpCsFixer\Config::create()
'phpdoc_separation' => true,
'phpdoc_to_comment' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_types' => ['groups' => ['simple', 'meta']],
'phpdoc_var_without_name' => true,
'self_accessor' => true,
'simplified_null_return' => true,
@@ -84,8 +84,6 @@ return PhpCsFixer\Config::create()
->files()
->in(__DIR__ . '/build')
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests/Framework')
->in(__DIR__ . '/tests/Runner')
->in(__DIR__ . '/tests/Util')
->in(__DIR__ . '/tests/unit')
->name('*.php')
);

View File

@@ -1,3 +0,0 @@
linters:
phpcs:
standard: 'build/phpcs.xml'

View File

@@ -11,7 +11,9 @@ php:
- 7.0
- 7.1
- 7.2
- master
matrix:
fast_finish: true
env:
matrix:

View File

@@ -1,233 +0,0 @@
# Changes in PHPUnit 5.7
All notable changes of the PHPUnit 5.7 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
## [5.7.26] - 2017-12-17
### Fixed
* Fixed [#2472](https://github.com/sebastianbergmann/phpunit/issues/2472): `PHPUnit\Util\Getopt` uses deprecated `each()` function
* Fixed [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833): Test class loaded during data provider execution is not discovered
* Fixed [#2922](https://github.com/sebastianbergmann/phpunit/issues/2922): Test class is not discovered when there is a test class with `@group` and provider throwing exception in it, tests are run with `--exclude-group` for that group, there is another class called later (after the class from above), and the name of that another class does not match its filename
## [5.7.25] - 2017-11-14
### Fixed
* Fixed [#2859](https://github.com/sebastianbergmann/phpunit/issues/2859): Regression caused by fix for [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833)
## [5.7.24] - 2017-11-14
### Fixed
* Fixed [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833): Test class loaded during data provider execution is not discovered
## [5.7.23] - 2017-10-15
### Fixed
* Fixed [#2731](https://github.com/sebastianbergmann/phpunit/issues/2731): Empty exception message cannot be expected
## [5.7.22] - 2017-09-24
### Fixed
* Fixed [#2769](https://github.com/sebastianbergmann/phpunit/issues/2769): Usage of `setUseErrorHandler()` produces `Undefined variable` error
## [5.7.21] - 2017-06-21
### Added
* Added `PHPUnit\Framework\AssertionFailedError`, `PHPUnit\Framework\Test`, and `PHPUnit\Framework\TestSuite` to the forward compatibility layer for PHPUnit 6
### Fixed
* Fixed [#2705](https://github.com/sebastianbergmann/phpunit/issues/2705): `stderr` parameter in `phpunit.xml` always considered `true`
## [5.7.20] - 2017-05-22
### Fixed
* Fixed [#2563](https://github.com/sebastianbergmann/phpunit/pull/2563): `phpunit --version` does not display version when running unsupported PHP
## [5.7.19] - 2017-04-03
### Fixed
* Fixed [#2638](https://github.com/sebastianbergmann/phpunit/pull/2638): Regression in `PHPUnit\Framework\TestCase:registerMockObjectsFromTestArguments()`
## [5.7.18] - 2017-04-02
### Fixed
* Fixed [#2145](https://github.com/sebastianbergmann/phpunit/issues/2145): `--stop-on-failure` fails to stop on PHP 7
* Fixed [#2572](https://github.com/sebastianbergmann/phpunit/issues/2572): `PHPUnit\Framework\TestCase:registerMockObjectsFromTestArguments()` does not correctly handle arrays that reference themselves
## [5.7.17] - 2017-03-19
### Fixed
* Fixed [#2016](https://github.com/sebastianbergmann/phpunit/issues/2016): `prophesize()` does not work when static attributes are backed up
* Fixed [#2568](https://github.com/sebastianbergmann/phpunit/issues/2568): `ArraySubsetConstraint` uses invalid cast to array
* Fixed [#2573](https://github.com/sebastianbergmann/phpunit/issues/2573): `getMockFromWsdl()` does not handle URLs with query parameters
* `PHPUnit\Util\Test::getDataFromTestWithAnnotation()` raises notice when docblock contains Windows line endings
## [5.7.16] - 2017-03-15
### Fixed
* Fixed [#2547](https://github.com/sebastianbergmann/phpunit/issues/2547): Code Coverage data is collected for test annotated with `@coversNothing`
* Fixed [#2558](https://github.com/sebastianbergmann/phpunit/issues/2558): `countOf()` function is missing
## [5.7.15] - 2017-03-02
### Fixed
* Fixed [#1999](https://github.com/sebastianbergmann/phpunit/issues/1999): Handler is inherited from previous custom option with handler
* Fixed [#2149](https://github.com/sebastianbergmann/phpunit/issues/2149): `assertCount()` does not handle generators properly
* Fixed [#2478](https://github.com/sebastianbergmann/phpunit/issues/2478): Tests that take too long are not reported as risky test
## [5.7.14] - 2017-02-19
### Fixed
* Fixed [#2489](https://github.com/sebastianbergmann/phpunit/issues/2489): `processUncoveredFilesFromWhitelist` is not handled correctly
* Fixed default values for `addUncoveredFilesFromWhitelist` and `processUncoveredFilesFromWhitelist` in `phpunit.xsd`
## [5.7.13] - 2017-02-10
### Fixed
* Fixed [#2493](https://github.com/sebastianbergmann/phpunit/issues/2493): Fix for [#2475](https://github.com/sebastianbergmann/phpunit/pull/2475) does not apply to PHPUnit 5.7
## [5.7.12] - 2017-02-08
### Fixed
* Fixed [#2475](https://github.com/sebastianbergmann/phpunit/pull/2475): Defining a test suite with only one file does not work
## [5.7.11] - 2017-02-05
### Fixed
* Deprecation errors when used with PHP 7.2
## [5.7.10] - 2017-02-04
### Fixed
* Fixed [#2462](https://github.com/sebastianbergmann/phpunit/issues/2462): Code Coverage whitelist is filled even if no code coverage data is to be collected
## [5.7.9] - 2017-01-28
### Fixed
* Fixed [#2447](https://github.com/sebastianbergmann/phpunit/issues/2447): Reverted backwards incompatible change to handling of boolean environment variable values specified in XML
## [5.7.8] - 2017-01-26
### Fixed
* Fixed [#2446](https://github.com/sebastianbergmann/phpunit/issues/2446): Reverted backwards incompatible change to exit code in case of warnings
## [5.7.7] - 2017-01-25
### Fixed
* Fixed [#1896](https://github.com/sebastianbergmann/phpunit/issues/1896): Wrong test location when `@depends` and `@dataProvider` are combined
* Fixed [#1983](https://github.com/sebastianbergmann/phpunit/pull/1983): Tests with `@expectedException` annotation cannot be skipped
* Fixed [#2137](https://github.com/sebastianbergmann/phpunit/issues/2137): Warnings for invalid data providers are suppressed when test execution is filtered
* Fixed [#2275](https://github.com/sebastianbergmann/phpunit/pull/2275): Invalid UTF-8 characters can lead to missing output
* Fixed [#2299](https://github.com/sebastianbergmann/phpunit/issues/2299): `expectExceptionMessage()` and `expectExceptionCode()` do not work without `expectException()`
* Fixed [#2328](https://github.com/sebastianbergmann/phpunit/issues/2328): `TestListener` callbacks `startTest()` and `endTest()` are not called when test is skipped due to `@depends`
* Fixed [#2331](https://github.com/sebastianbergmann/phpunit/issues/2331): Boolean environment variable values specified in XML get mangled
* Fixed [#2333](https://github.com/sebastianbergmann/phpunit/issues/2333): `assertContains()` and `assertNotContains()` do not handle UTF-8 strings correctly
* Fixed [#2340](https://github.com/sebastianbergmann/phpunit/pull/2340): Data providers that use `yield` or implement `Iterator` cannot be combined
* Fixed [#2349](https://github.com/sebastianbergmann/phpunit/pull/2349): `PHPUnit_TextUI_Command` does not `exit()` when it should
* Fixed [#2392](https://github.com/sebastianbergmann/phpunit/issues/2392): Empty (but valid) data provider should skip the test
* Fixed [#2431](https://github.com/sebastianbergmann/phpunit/issues/2431): `assertArraySubset()` does not support `ArrayAccess`
* Fixed [#2435](https://github.com/sebastianbergmann/phpunit/issues/2435): Empty `@group` annotation causes error on PHP 7.2+
## [5.7.6] - 2017-01-22
### Fixed
* Fixed [#2424](https://github.com/sebastianbergmann/phpunit/issues/2424): `TestCase::getStatus()` returns `STATUS_PASSED` instead of `STATUS_RISKY` for risky test
* Fixed [#2427](https://github.com/sebastianbergmann/phpunit/issues/2427): TestDox group configuration is not handled
* Fixed [#2428](https://github.com/sebastianbergmann/phpunit/pull/2428): Nested arrays specificied in XML configuration file are not handled correctly
## [5.7.5] - 2016-12-28
### Fixed
* Fixed [#2404](https://github.com/sebastianbergmann/phpunit/pull/2404): `assertDirectoryNotIsWriteable()` calls itself
## [5.7.4] - 2016-12-13
### Fixed
* Fixed [#2394](https://github.com/sebastianbergmann/phpunit/issues/2394): Do not treat `AssertionError` as assertion failure on PHP 5
## [5.7.3] - 2016-12-09
### Fixed
* Fixed [#2384](https://github.com/sebastianbergmann/phpunit/pull/2384): Handle `PHPUnit_Framework_Exception` correctly when expecting exceptions
## [5.7.2] - 2016-12-03
### Fixed
* Fixed [#2382](https://github.com/sebastianbergmann/phpunit/issues/2382): Uncloneable test doubles passed via data provider do not work
## [5.7.1] - 2016-12-02
### Fixed
* Fixed [#2380](https://github.com/sebastianbergmann/phpunit/issues/2380): Data Providers cannot be generators anymore
## [5.7.0] - 2016-12-02
### Added
* Merged [#2223](https://github.com/sebastianbergmann/phpunit/pull/2223): Add support for multiple data providers
* Added `extensionsDirectory` configuration directive to configure a directory from which all `.phar` files are loaded as PHPUnit extensions
* Added `--no-extensions` commandline option to suppress loading of extensions (from configured extension directory)
* Added `PHPUnit\Framework\Assert` as an alias for `PHPUnit_Framework_Assert` for forward compatibility
* Added `PHPUnit\Framework\BaseTestListener` as an alias for `PHPUnit_Framework_BaseTestListener` for forward compatibility
* Added `PHPUnit\Framework\TestListener` as an alias for `PHPUnit_Framework_TestListener` for forward compatibility
### Changed
* The `--log-json` commandline option has been deprecated
* The `--tap` and `--log-tap` commandline options have been deprecated
* The `--self-update` and `--self-upgrade` commandline options have been deprecated (PHAR binary only)
[5.7.26]: https://github.com/sebastianbergmann/phpunit/compare/5.7.25...5.7.26
[5.7.25]: https://github.com/sebastianbergmann/phpunit/compare/5.7.24...5.7.25
[5.7.24]: https://github.com/sebastianbergmann/phpunit/compare/5.7.23...5.7.24
[5.7.23]: https://github.com/sebastianbergmann/phpunit/compare/5.7.22...5.7.23
[5.7.22]: https://github.com/sebastianbergmann/phpunit/compare/5.7.21...5.7.22
[5.7.21]: https://github.com/sebastianbergmann/phpunit/compare/5.7.20...5.7.21
[5.7.20]: https://github.com/sebastianbergmann/phpunit/compare/5.7.19...5.7.20
[5.7.19]: https://github.com/sebastianbergmann/phpunit/compare/5.7.18...5.7.19
[5.7.18]: https://github.com/sebastianbergmann/phpunit/compare/5.7.17...5.7.18
[5.7.17]: https://github.com/sebastianbergmann/phpunit/compare/5.7.16...5.7.17
[5.7.16]: https://github.com/sebastianbergmann/phpunit/compare/5.7.15...5.7.16
[5.7.15]: https://github.com/sebastianbergmann/phpunit/compare/5.7.14...5.7.15
[5.7.14]: https://github.com/sebastianbergmann/phpunit/compare/5.7.13...5.7.14
[5.7.13]: https://github.com/sebastianbergmann/phpunit/compare/5.7.12...5.7.13
[5.7.12]: https://github.com/sebastianbergmann/phpunit/compare/5.7.11...5.7.12
[5.7.11]: https://github.com/sebastianbergmann/phpunit/compare/5.7.10...5.7.11
[5.7.10]: https://github.com/sebastianbergmann/phpunit/compare/5.7.9...5.7.10
[5.7.9]: https://github.com/sebastianbergmann/phpunit/compare/5.7.8...5.7.9
[5.7.8]: https://github.com/sebastianbergmann/phpunit/compare/5.7.7...5.7.8
[5.7.7]: https://github.com/sebastianbergmann/phpunit/compare/5.7.6...5.7.7
[5.7.6]: https://github.com/sebastianbergmann/phpunit/compare/5.7.5...5.7.6
[5.7.5]: https://github.com/sebastianbergmann/phpunit/compare/5.7.4...5.7.5
[5.7.4]: https://github.com/sebastianbergmann/phpunit/compare/5.7.3...5.7.4
[5.7.3]: https://github.com/sebastianbergmann/phpunit/compare/5.7.2...5.7.3
[5.7.2]: https://github.com/sebastianbergmann/phpunit/compare/5.7.1...5.7.2
[5.7.1]: https://github.com/sebastianbergmann/phpunit/compare/5.7.0...5.7.1
[5.7.0]: https://github.com/sebastianbergmann/phpunit/compare/5.6...5.7.0

View File

@@ -2,6 +2,67 @@
All notable changes of the PHPUnit 6.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
## [6.5.14] - 2019-02-01
### Fixed
* Fixed [#3459](https://github.com/sebastianbergmann/phpunit/issues/3459): `@requires` function swallows digits at the end of function name
## [6.5.13] - 2018-09-08
### Fixed
* Fixed [#3181](https://github.com/sebastianbergmann/phpunit/issues/3181): `--filter` should be case-insensitive
* Fixed [#3234](https://github.com/sebastianbergmann/phpunit/issues/3234): `assertArraySubset()` with `$strict=true` does not display differences properly
* Fixed [#3254](https://github.com/sebastianbergmann/phpunit/issues/3254): TextUI test runner cannot run a `Test` instance that is not a `TestSuite`
## [6.5.12] - 2018-08-22
### Fixed
* Fixed [#3248](https://github.com/sebastianbergmann/phpunit/issues/3248) and [#3233](https://github.com/sebastianbergmann/phpunit/issues/3233): `phpunit.xsd` dictates element order where it should not
* Fixed [#3251](https://github.com/sebastianbergmann/phpunit/issues/3251): TeamCity result logger is missing test duration information
## [6.5.11] - 2018-08-07
### Fixed
* Fixed [#3219](https://github.com/sebastianbergmann/phpunit/issues/3219): `getMockFromWsdl()` generates invalid PHP code when WSDL filename contains special characters
## [6.5.10] - 2018-08-03
### Fixed
* Fixed [#3209](https://github.com/sebastianbergmann/phpunit/issues/3209): `Test::run()` and `TestCase::run()` interface contradiction
* Fixed [#3218](https://github.com/sebastianbergmann/phpunit/issues/3218): `prefix` attribute for `directory` node missing from `phpunit.xml` XSD
* Fixed [#3225](https://github.com/sebastianbergmann/phpunit/issues/3225): `coverage-php` missing from `phpunit.xsd`
## [6.5.9] - 2018-07-03
### Fixed
* Fixed [#3142](https://github.com/sebastianbergmann/phpunit/issues/3142): Method-level annotations (`@backupGlobals`, `@backupStaticAttributes`, `@errorHandler`, `@preserveGlobalState`) do not override class-level annotations
## [6.5.8] - 2018-04-10
### Fixed
* Fixed [#2830](https://github.com/sebastianbergmann/phpunit/issues/2830): `@runClassInSeparateProcess` does not work for tests that use `@dataProvider`
## [6.5.7] - 2018-02-26
### Fixed
* Fixed [#2974](https://github.com/sebastianbergmann/phpunit/issues/2974): JUnit XML logfile contains invalid characters when test output contains binary data
## [6.5.6] - 2018-02-01
### Fixed
* Fixed [#2236](https://github.com/sebastianbergmann/phpunit/issues/2236): Exceptions in `tearDown()` do not affect `getStatus()`
* Fixed [#2950](https://github.com/sebastianbergmann/phpunit/issues/2950): Class extending `PHPUnit\Framework\TestSuite` does not extend `PHPUnit\FrameworkTestCase`
* Fixed [#2972](https://github.com/sebastianbergmann/phpunit/issues/2972): PHPUnit crashes when test suite contains both `.phpt` files and unconventionally named tests
## [6.5.5] - 2017-12-17
### Fixed
@@ -42,6 +103,15 @@ All notable changes of the PHPUnit 6.5 release series are documented in this fil
* Fixed [#2654](https://github.com/sebastianbergmann/phpunit/issues/2654): Problems with `assertJsonStringEqualsJsonString()`
* Fixed [#2810](https://github.com/sebastianbergmann/phpunit/pull/2810): Code Coverage for PHPT tests does not work
[6.5.14]: https://github.com/sebastianbergmann/phpunit/compare/6.5.13...6.5.14
[6.5.13]: https://github.com/sebastianbergmann/phpunit/compare/6.5.12...6.5.13
[6.5.12]: https://github.com/sebastianbergmann/phpunit/compare/6.5.11...6.5.12
[6.5.11]: https://github.com/sebastianbergmann/phpunit/compare/6.5.10...6.5.11
[6.5.10]: https://github.com/sebastianbergmann/phpunit/compare/6.5.9...6.5.10
[6.5.9]: https://github.com/sebastianbergmann/phpunit/compare/6.5.8...6.5.9
[6.5.8]: https://github.com/sebastianbergmann/phpunit/compare/6.5.7...6.5.8
[6.5.7]: https://github.com/sebastianbergmann/phpunit/compare/6.5.6...6.5.7
[6.5.6]: https://github.com/sebastianbergmann/phpunit/compare/6.5.5...6.5.6
[6.5.5]: https://github.com/sebastianbergmann/phpunit/compare/6.5.4...6.5.5
[6.5.4]: https://github.com/sebastianbergmann/phpunit/compare/6.5.3...6.5.4
[6.5.3]: https://github.com/sebastianbergmann/phpunit/compare/6.5.2...6.5.3

View File

@@ -1,6 +1,6 @@
PHPUnit
Copyright (c) 2001-2017, Sebastian Bergmann <sebastian@phpunit.de>.
Copyright (c) 2001-2019, Sebastian Bergmann <sebastian@phpunit.de>.
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@@ -8,25 +8,15 @@ PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of
## Installation
We distribute a [PHP Archive (PHAR)](https://php.net/phar) that has all required (as well as some optional) dependencies of PHPUnit bundled in a single file:
We distribute a [PHP Archive (PHAR)](https://php.net/phar) that has all required (as well as some optional) dependencies of PHPUnit 6.5 bundled in a single file:
```bash
$ wget https://phar.phpunit.de/phpunit.phar
$ wget https://phar.phpunit.de/phpunit-6.5.phar
$ chmod +x phpunit.phar
$ mv phpunit.phar /usr/local/bin/phpunit
$ php phpunit-6.5.phar --version
```
You can also immediately use the PHAR after you have downloaded it, of course:
```bash
$ wget https://phar.phpunit.de/phpunit.phar
$ php phpunit.phar
```
Alternatively, you may use [Composer](https://getcomposer.org/) to download and install PHPUnit as well as its dependencies. Please refer to the [documentation](https://phpunit.de/documentation.html) for details on how to do this.
Alternatively, you may use [Composer](https://getcomposer.org/) to download and install PHPUnit as well as its dependencies. Please refer to the "[Getting Started](https://phpunit.de/getting-started-with-phpunit.html)" guide for details on how to install PHPUnit.
## Contribute
@@ -37,10 +27,15 @@ Please refer to [CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/b
Thanks to everyone who has contributed to PHPUnit! You can find a detailed list of contributors on every PHPUnit related package on GitHub. This list shows only the major components:
* [PHPUnit](https://github.com/sebastianbergmann/phpunit/graphs/contributors)
* [PHP_CodeCoverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors)
* [PHPUnit_MockObject](https://github.com/sebastianbergmann/phpunit-mock-objects/graphs/contributors)
* [php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors)
* [phpunit-mock-objects](https://github.com/sebastianbergmann/phpunit-mock-objects/graphs/contributors)
A very special thanks to everyone who has contributed to the documentation and helps maintain the translations:
* [PHPUnit Documentation](https://github.com/sebastianbergmann/phpunit-documentation/graphs/contributors)
* [English](https://github.com/sebastianbergmann/phpunit-documentation-english/graphs/contributors)
* [Spanish](https://github.com/sebastianbergmann/phpunit-documentation-spanish/graphs/contributors)
* [French](https://github.com/sebastianbergmann/phpunit-documentation-french/graphs/contributors)
* [Japanese](https://github.com/sebastianbergmann/phpunit-documentation-japanese/graphs/contributors)
* [Brazilian Portuguese](https://github.com/sebastianbergmann/phpunit-documentation-brazilian-portuguese/graphs/contributors)
* [Simplified Chinese](https://github.com/sebastianbergmann/phpunit-documentation-chinese/graphs/contributors)

View File

@@ -37,7 +37,7 @@ 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 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-%PHP_VERSION%-Win32-VC14-x86.zip
- IF NOT EXIST php-installed.txt curl -fsS -o php-%PHP_VERSION%-Win32-VC14-x86.zip https://windows.php.net/downloads/releases/archives/php-%PHP_VERSION%-Win32-VC14-x86.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
@@ -52,9 +52,9 @@ install:
- 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 appveyor DownloadFile https://getcomposer.org/composer.phar
- 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 appveyor DownloadFile https://xdebug.org/files/php_xdebug-%XDEBUG_VERSION%-vc14.dll -FileName c:\php\%PHP_VERSION%\ext\php_xdebug-%XDEBUG_VERSION%-vc14.dll
- 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

View File

@@ -26,10 +26,9 @@
<property name="prepare.done" value="true"/>
</target>
<target name="validate-composer-json" unless="validate-composer-json.done" description="Validate composer.json">
<target name="validate-composer-json" depends="clean" unless="validate-composer-json.done" description="Validate composer.json">
<exec executable="${basedir}/build/tools/composer" failonerror="true" taskname="composer">
<arg value="validate"/>
<arg value="--no-check-lock"/>
<arg value="--strict"/>
<arg value="${basedir}/composer.json"/>
</exec>
@@ -51,6 +50,17 @@
</exec>
</target>
<target name="check-dependencies" description="Performs check for outdated dependencies">
<exec executable="${basedir}/build/tools/composer" taskname="composer">
<arg value="show"/>
<arg value="--minor-only"/>
<arg value="--latest"/>
<arg value="--direct"/>
<arg value="--outdated"/>
<arg value="--strict"/>
</exec>
</target>
<target name="php-syntax-check" unless="php-syntax-check.done" description="Perform syntax check on PHP files">
<apply executable="php" failonerror="true" taskname="lint">
<arg value="-l"/>
@@ -100,7 +110,7 @@
</exec>
</target>
<target name="phar" depends="-phar-determine-version,-phar-prepare" description="Create PHAR archive of PHPUnit and all its dependencies">
<target name="phar" depends="-phar-prepare,-phar-determine-version" description="Create PHAR archive of PHPUnit and all its dependencies">
<antcall target="-phar-build">
<param name="type" value="release"/>
</antcall>
@@ -116,15 +126,14 @@
<mkdir dir="${basedir}/build/phar"/>
<copy file="${basedir}/composer.json" tofile="${basedir}/composer.json.bak"/>
<exec executable="${basedir}/build/tools/composer">
<exec executable="${basedir}/build/tools/composer" failonerror="true">
<arg value="require"/>
<arg value="phpunit/php-invoker:~1.1"/>
</exec>
<move file="${basedir}/composer.json.bak" tofile="${basedir}/composer.json"/>
<exec executable="${basedir}/build/phar-manifest.php" output="${basedir}/build/phar/manifest.txt"/>
<copy todir="${basedir}/build/phar" file="${basedir}/build/ca.pem" />
<exec executable="${basedir}/build/phar-manifest.php" output="${basedir}/build/phar/manifest.txt" failonerror="true"/>
<copy file="${basedir}/vendor/phpunit/php-code-coverage/LICENSE" tofile="${basedir}/build/phar/php-code-coverage/LICENSE"/>
<copy todir="${basedir}/build/phar/php-code-coverage">
@@ -330,12 +339,12 @@
</fileset>
</copy>
<exec executable="${basedir}/build/phar-version.php" outputproperty="_version">
<exec executable="${basedir}/build/phar-version.php" outputproperty="_version" failonerror="true">
<arg value="${version}"/>
<arg value="${type}"/>
</exec>
<exec executable="${basedir}/build/tools/phpab" taskname="phpab">
<exec executable="${basedir}/build/tools/phpab" taskname="phpab" failonerror="true">
<arg value="--all" />
<arg value="--static" />
<arg value="--once" />
@@ -352,7 +361,7 @@
<copy file="${basedir}/build/binary-phar-autoload.php.in" tofile="${basedir}/build/binary-phar-autoload.php"/>
<replace file="${basedir}/build/binary-phar-autoload.php" token="X.Y.Z" value="${_version}"/>
<exec executable="${basedir}/build/tools/phpab" taskname="phpab">
<exec executable="${basedir}/build/tools/phpab" taskname="phpab" failonerror="true">
<arg value="--all" />
<arg value="--nolower" />
<arg value="--static" />
@@ -373,13 +382,24 @@
</target>
<target name="-phar-determine-version">
<exec executable="${basedir}/build/version.php" outputproperty="version" />
<exec executable="${basedir}/build/version.php" outputproperty="version" failonerror="true" />
</target>
<target name="generate-project-documentation" depends="-phploc,-phpcs,-phpmd,-phpunit">
<target name="generate-project-documentation" depends="-phploc,-checkstyle,-phpunit">
<exec executable="${basedir}/build/tools/phpdox" dir="${basedir}/build" taskname="phpdox"/>
</target>
<target name="update-tools">
<exec executable="phive">
<arg value="--no-progress"/>
<arg value="update"/>
</exec>
<exec executable="${basedir}/build/tools/composer">
<arg value="self-update"/>
</exec>
</target>
<target name="-phploc" depends="prepare">
<exec executable="${basedir}/build/tools/phploc" output="/dev/null" taskname="phploc">
<arg value="--count-tests"/>
@@ -390,31 +410,12 @@
</exec>
</target>
<target name="phpcs">
<exec executable="${basedir}/build/tools/phpcs" taskname="phpcs">
<arg value="--standard=${basedir}/build/phpcs.xml"/>
<arg value="--extensions=php"/>
<arg value="--cache"/>
</exec>
</target>
<target name="-phpcs" depends="prepare">
<exec executable="${basedir}/build/tools/phpcs" output="/dev/null" taskname="phpcs">
<arg value="--standard=${basedir}/build/phpcs.xml"/>
<arg value="--extensions=php"/>
<arg value="--cache"/>
<arg value="--report=checkstyle"/>
<arg value="--report-file=${basedir}/build/logfiles/checkstyle.xml"/>
</exec>
</target>
<target name="-phpmd" depends="prepare">
<exec executable="${basedir}/build/tools/phpmd" taskname="phpmd">
<arg path="${basedir}/src"/>
<arg value="xml"/>
<arg path="${basedir}/build/phpmd.xml"/>
<arg value="--reportfile"/>
<arg path="${basedir}/build/logfiles/pmd.xml"/>
<target name="-checkstyle" depends="prepare">
<exec executable="${basedir}/build/tools/php-cs-fixer" output="${basedir}/build/logfiles/checkstyle.xml" error="/dev/null" taskname="php-cs-fixer">
<arg value="--diff"/>
<arg value="--dry-run"/>
<arg value="fix"/>
<arg value="--format=checkstyle"/>
</exec>
</target>

View File

@@ -35,7 +35,7 @@
"phpunit/php-file-iterator": "^1.4.3",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-timer": "^1.0.9",
"phpunit/phpunit-mock-objects": "^5.0.5",
"phpunit/phpunit-mock-objects": "^5.0.9",
"sebastian/comparator": "^2.1",
"sebastian/diff": "^2.0",
"sebastian/environment": "^3.1",

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpab" version="^1.24.1" installed="1.25.1" location="./build/tools/phpab" copy="true"/>
<phar name="php-cs-fixer" version="^2.12.0" installed="2.14.0" location="./build/tools/php-cs-fixer" copy="true"/>
<phar name="phpdox" version="^0.11.2" installed="0.11.2" location="./build/tools/phpdox" copy="true"/>
<phar name="phploc" version="^4.0.1" installed="4.0.1" location="./build/tools/phploc" copy="true"/>
</phive>

View File

@@ -4,15 +4,12 @@
bootstrap="tests/bootstrap.php"
verbose="true">
<testsuites>
<testsuite name="small">
<directory suffix="Test.php">tests/Framework</directory>
<directory suffix="Test.php">tests/Runner</directory>
<directory suffix="Test.php">tests/Util</directory>
<testsuite name="unit">
<directory suffix="Test.php">tests/unit</directory>
</testsuite>
<testsuite name="large">
<directory suffix=".phpt">tests/TextUI</directory>
<directory suffix=".phpt">tests/Regression</directory>
<testsuite name="end-to-end">
<directory suffix=".phpt">tests/end-to-end</directory>
</testsuite>
</testsuites>

View File

@@ -1,269 +1,279 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:documentation source="https://phpunit.de/manual/6.5/en/appendixes.configuration.html">
This Schema file defines the rules by which the XML configuration file of PHPUnit 6.5 may be structured.
</xs:documentation>
<xs:appinfo source="https://phpunit.de/manual/6.5/en/appendixes.configuration.html"/>
</xs:annotation>
<xs:element name="phpunit" type="phpUnitType">
<xs:annotation>
<xs:documentation>Root Element</xs:documentation>
<xs:documentation source="https://phpunit.de/manual/6.5/en/appendixes.configuration.html">
This Schema file defines the rules by which the XML configuration file of PHPUnit 6.5 may be structured.
</xs:documentation>
<xs:appinfo source="https://phpunit.de/manual/6.5/en/appendixes.configuration.html"/>
</xs:annotation>
</xs:element>
<xs:complexType name="filtersType">
<xs:sequence>
<xs:element name="whitelist" type="whiteListType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="filterType">
<xs:sequence>
<xs:group ref="pathGroup"/>
<xs:element name="exclude" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:group ref="pathGroup"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="whiteListType">
<xs:complexContent>
<xs:extension base="filterType">
<xs:attribute name="addUncoveredFilesFromWhitelist" default="true" type="xs:boolean"/>
<xs:attribute name="processUncoveredFilesFromWhitelist" default="false" type="xs:boolean"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="groupsType">
<xs:choice>
<xs:sequence>
<xs:element name="include" type="groupType"/>
<xs:element name="exclude" type="groupType" minOccurs="0"/>
</xs:sequence>
<xs:sequence>
<xs:element name="exclude" type="groupType"/>
</xs:sequence>
</xs:choice>
</xs:complexType>
<xs:complexType name="groupType">
<xs:sequence>
<xs:element name="group" type="xs:string" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="listenersType">
<xs:sequence>
<xs:element name="listener" type="objectType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="objectType">
<xs:sequence>
<xs:element name="arguments" minOccurs="0">
<xs:complexType>
<xs:group ref="argumentsGroup"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="class" type="xs:string" use="required"/>
<xs:attribute name="file" type="xs:anyURI"/>
</xs:complexType>
<xs:complexType name="arrayType">
<xs:sequence>
<xs:element name="element" type="argumentType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="argumentType">
<xs:group ref="argumentChoice"/>
<xs:attribute name="key" use="required"/>
</xs:complexType>
<xs:group name="argumentsGroup">
<xs:sequence>
<xs:element name="array" type="arrayType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="string" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="double" type="xs:double" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="null" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="object" type="objectType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="file" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="directory" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>
<xs:group name="argumentChoice">
<xs:choice>
<xs:element name="array" type="arrayType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="string" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="double" type="xs:double" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="null" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="object" type="objectType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="file" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="directory" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
</xs:group>
<xs:simpleType name="columnsType">
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:integer"/>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="max"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:complexType name="loggersType">
<xs:sequence>
<xs:element name="log" type="loggerType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="loggerType">
<xs:attribute name="type">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="coverage-html"/>
<xs:enumeration value="coverage-text"/>
<xs:enumeration value="coverage-clover"/>
<xs:enumeration value="coverage-crap4j"/>
<xs:enumeration value="coverage-xml"/>
<xs:enumeration value="json"/>
<xs:enumeration value="plain"/>
<xs:enumeration value="tap"/>
<xs:enumeration value="teamcity"/>
<xs:enumeration value="junit"/>
<xs:enumeration value="testdox-html"/>
<xs:enumeration value="testdox-text"/>
<xs:enumeration value="testdox-xml"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="target" type="xs:anyURI"/>
<xs:attribute name="lowUpperBound" type="xs:nonNegativeInteger" default="35"/>
<xs:attribute name="highLowerBound" type="xs:nonNegativeInteger" default="70"/>
<xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/>
<xs:attribute name="threshold" type="xs:nonNegativeInteger" default="30"/>
</xs:complexType>
<xs:group name="pathGroup">
<xs:sequence>
<xs:element name="directory" type="directoryFilterType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="file" type="fileFilterType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>
<xs:complexType name="directoryFilterType">
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attribute type="xs:string" name="suffix" default="Test.php"/>
<xs:attributeGroup ref="phpVersionGroup"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="fileFilterType">
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attributeGroup ref="phpVersionGroup"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:attributeGroup name="phpVersionGroup">
<xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/>
<xs:attribute name="phpVersionOperator" type="xs:string" default="&gt;="/>
</xs:attributeGroup>
<xs:complexType name="phpType">
<xs:sequence>
<xs:choice maxOccurs="unbounded">
<xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="namedValueType">
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="value" use="required" type="xs:anySimpleType"/>
<xs:attribute name="verbatim" use="optional" type="xs:boolean"/>
<xs:attribute name="force" use="optional" type="xs:boolean"/>
</xs:complexType>
<xs:complexType name="phpUnitType">
<xs:annotation>
<xs:documentation>The main type specifying the document structure</xs:documentation>
</xs:annotation>
<xs:group ref="configGroup"/>
<xs:attributeGroup ref="configAttributeGroup"/>
</xs:complexType>
<xs:attributeGroup name="configAttributeGroup">
<xs:attribute name="backupGlobals" type="xs:boolean" default="false"/>
<xs:attribute name="backupStaticAttributes" type="xs:boolean" default="false"/>
<xs:attribute name="bootstrap" type="xs:anyURI"/>
<xs:attribute name="cacheTokens" type="xs:boolean"/>
<xs:attribute name="colors" type="xs:boolean" default="false"/>
<xs:attribute name="columns" type="columnsType" default="80"/>
<xs:attribute name="convertDeprecationsToExceptions" type="xs:boolean" default="true"/>
<xs:attribute name="convertErrorsToExceptions" type="xs:boolean" default="true"/>
<xs:attribute name="convertNoticesToExceptions" type="xs:boolean" default="true"/>
<xs:attribute name="convertWarningsToExceptions" type="xs:boolean" default="true"/>
<xs:attribute name="forceCoversAnnotation" type="xs:boolean" default="false"/>
<xs:attribute name="printerClass" type="xs:string" default="PHPUnit_TextUI_ResultPrinter"/>
<xs:attribute name="printerFile" type="xs:anyURI"/>
<xs:attribute name="processIsolation" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnError" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnWarning" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/>
<xs:attribute name="failOnRisky" type="xs:boolean" default="false"/>
<xs:attribute name="failOnWarning" type="xs:boolean" default="false"/>
<xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/>
<xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/>
<xs:attribute name="beStrictAboutResourceUsageDuringSmallTests" type="xs:boolean" default="false"/>
<xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="true"/>
<xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/>
<xs:attribute name="beStrictAboutCoversAnnotation" type="xs:boolean" default="false"/>
<xs:attribute name="enforceTimeLimit" type="xs:boolean" default="false"/>
<xs:attribute name="ignoreDeprecatedCodeUnitsFromCodeCoverage" type="xs:boolean" default="false"/>
<xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/>
<xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/>
<xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/>
<xs:attribute name="testSuiteLoaderClass" type="xs:string" default="PHPUnit_Runner_StandardTestSuiteLoader"/>
<xs:attribute name="testSuiteLoaderFile" type="xs:anyURI"/>
<xs:attribute name="defaultTestSuite" type="xs:string" default=""/>
<xs:attribute name="verbose" type="xs:boolean" default="false"/>
<xs:attribute name="stderr" type="xs:boolean" default="false"/>
<xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/>
<xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/>
<xs:attribute name="extensionsDirectory" type="xs:string"/>
</xs:attributeGroup>
<xs:group name="configGroup">
<xs:all>
<xs:element ref="testSuiteFacet" minOccurs="0"/>
<xs:element name="groups" type="groupsType" minOccurs="0"/>
<xs:element name="testdoxGroups" type="groupsType" minOccurs="0"/>
<xs:element name="filter" type="filtersType" minOccurs="0"/>
<xs:element name="logging" type="loggersType" minOccurs="0"/>
<xs:element name="listeners" type="listenersType" minOccurs="0"/>
<xs:element name="php" type="phpType" minOccurs="0"/>
</xs:all>
</xs:group>
<xs:element name="testSuiteFacet" abstract="true"/>
<xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/>
<xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/>
<xs:complexType name="testSuitesType">
<xs:sequence>
<xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="testSuiteType">
<xs:sequence>
<xs:group ref="pathGroup"/>
<xs:element name="exclude" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<xs:element name="phpunit" type="phpUnitType">
<xs:annotation>
<xs:documentation>Root Element</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="filtersType">
<xs:sequence>
<xs:element name="whitelist" type="whiteListType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="filterType">
<xs:sequence>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:group ref="pathGroup"/>
<xs:element name="exclude">
<xs:complexType>
<xs:group ref="pathGroup"/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="whiteListType">
<xs:complexContent>
<xs:extension base="filterType">
<xs:attribute name="addUncoveredFilesFromWhitelist" default="true" type="xs:boolean"/>
<xs:attribute name="processUncoveredFilesFromWhitelist" default="false" type="xs:boolean"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="groupsType">
<xs:choice>
<xs:sequence>
<xs:element name="include" type="groupType"/>
<xs:element name="exclude" type="groupType" minOccurs="0"/>
</xs:sequence>
<xs:sequence>
<xs:element name="exclude" type="groupType"/>
</xs:sequence>
</xs:choice>
</xs:complexType>
<xs:complexType name="groupType">
<xs:sequence>
<xs:element name="group" type="xs:string" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="listenersType">
<xs:sequence>
<xs:element name="listener" type="objectType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="objectType">
<xs:sequence>
<xs:element name="arguments" minOccurs="0">
<xs:complexType>
<xs:group ref="argumentsGroup"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="class" type="xs:string" use="required"/>
<xs:attribute name="file" type="xs:anyURI"/>
</xs:complexType>
<xs:complexType name="arrayType">
<xs:sequence>
<xs:element name="element" type="argumentType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="argumentType">
<xs:group ref="argumentChoice"/>
<xs:attribute name="key" use="required"/>
</xs:complexType>
<xs:group name="argumentsGroup">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="array" type="arrayType" />
<xs:element name="integer" type="xs:integer" />
<xs:element name="string" type="xs:string" />
<xs:element name="double" type="xs:double" />
<xs:element name="null" />
<xs:element name="object" type="objectType" />
<xs:element name="file" type="xs:anyURI" />
<xs:element name="directory" type="xs:anyURI" />
<xs:element name="boolean" type="xs:boolean" />
</xs:choice>
</xs:sequence>
</xs:group>
<xs:group name="argumentChoice">
<xs:choice>
<xs:element name="array" type="arrayType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="string" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="double" type="xs:double" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="null" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="object" type="objectType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="file" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="directory" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
</xs:group>
<xs:simpleType name="columnsType">
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:integer"/>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="max"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:complexType name="loggersType">
<xs:sequence>
<xs:element name="log" type="loggerType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="loggerType">
<xs:attribute name="type">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="coverage-html"/>
<xs:enumeration value="coverage-text"/>
<xs:enumeration value="coverage-clover"/>
<xs:enumeration value="coverage-crap4j"/>
<xs:enumeration value="coverage-xml"/>
<xs:enumeration value="coverage-php"/>
<xs:enumeration value="json"/>
<xs:enumeration value="plain"/>
<xs:enumeration value="tap"/>
<xs:enumeration value="teamcity"/>
<xs:enumeration value="junit"/>
<xs:enumeration value="testdox-html"/>
<xs:enumeration value="testdox-text"/>
<xs:enumeration value="testdox-xml"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="target" type="xs:anyURI"/>
<xs:attribute name="lowUpperBound" type="xs:nonNegativeInteger" default="35"/>
<xs:attribute name="highLowerBound" type="xs:nonNegativeInteger" default="70"/>
<xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/>
<xs:attribute name="showOnlySummary" type="xs:boolean" default="false"/>
<xs:attribute name="threshold" type="xs:nonNegativeInteger" default="30"/>
</xs:complexType>
<xs:group name="pathGroup">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="directory" type="directoryFilterType"/>
<xs:element name="file" type="fileFilterType"/>
</xs:choice>
</xs:sequence>
</xs:group>
<xs:complexType name="directoryFilterType">
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attribute type="xs:string" name="prefix" default=""/>
<xs:attribute type="xs:string" name="suffix" default="Test.php"/>
<xs:attributeGroup ref="phpVersionGroup"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="fileFilterType">
<xs:simpleContent>
<xs:extension base="xs:anyURI">
<xs:attributeGroup ref="phpVersionGroup"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:attributeGroup name="phpVersionGroup">
<xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/>
<xs:attribute name="phpVersionOperator" type="xs:string" default="&gt;="/>
</xs:attributeGroup>
<xs:complexType name="phpType">
<xs:sequence>
<xs:choice maxOccurs="unbounded">
<xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="namedValueType">
<xs:attribute name="name" use="required" type="xs:string"/>
<xs:attribute name="value" use="required" type="xs:anySimpleType"/>
<xs:attribute name="verbatim" use="optional" type="xs:boolean"/>
<xs:attribute name="force" use="optional" type="xs:boolean"/>
</xs:complexType>
<xs:complexType name="phpUnitType">
<xs:annotation>
<xs:documentation>The main type specifying the document structure</xs:documentation>
</xs:annotation>
<xs:group ref="configGroup"/>
<xs:attributeGroup ref="configAttributeGroup"/>
</xs:complexType>
<xs:attributeGroup name="configAttributeGroup">
<xs:attribute name="backupGlobals" type="xs:boolean" default="false"/>
<xs:attribute name="backupStaticAttributes" type="xs:boolean" default="false"/>
<xs:attribute name="bootstrap" type="xs:anyURI"/>
<xs:attribute name="cacheTokens" type="xs:boolean"/>
<xs:attribute name="colors" type="xs:boolean" default="false"/>
<xs:attribute name="columns" type="columnsType" default="80"/>
<xs:attribute name="convertDeprecationsToExceptions" type="xs:boolean" default="true"/>
<xs:attribute name="convertErrorsToExceptions" type="xs:boolean" default="true"/>
<xs:attribute name="convertNoticesToExceptions" type="xs:boolean" default="true"/>
<xs:attribute name="convertWarningsToExceptions" type="xs:boolean" default="true"/>
<xs:attribute name="forceCoversAnnotation" type="xs:boolean" default="false"/>
<xs:attribute name="printerClass" type="xs:string" default="PHPUnit_TextUI_ResultPrinter"/>
<xs:attribute name="printerFile" type="xs:anyURI"/>
<xs:attribute name="processIsolation" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnError" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnWarning" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/>
<xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/>
<xs:attribute name="failOnRisky" type="xs:boolean" default="false"/>
<xs:attribute name="failOnWarning" type="xs:boolean" default="false"/>
<xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/>
<xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/>
<xs:attribute name="beStrictAboutResourceUsageDuringSmallTests" type="xs:boolean" default="false"/>
<xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="true"/>
<xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/>
<xs:attribute name="beStrictAboutCoversAnnotation" type="xs:boolean" default="false"/>
<xs:attribute name="enforceTimeLimit" type="xs:boolean" default="false"/>
<xs:attribute name="ignoreDeprecatedCodeUnitsFromCodeCoverage" type="xs:boolean" default="false"/>
<xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/>
<xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/>
<xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/>
<xs:attribute name="testSuiteLoaderClass" type="xs:string" default="PHPUnit_Runner_StandardTestSuiteLoader"/>
<xs:attribute name="testSuiteLoaderFile" type="xs:anyURI"/>
<xs:attribute name="defaultTestSuite" type="xs:string" default=""/>
<xs:attribute name="verbose" type="xs:boolean" default="false"/>
<xs:attribute name="stderr" type="xs:boolean" default="false"/>
<xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/>
<xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/>
<xs:attribute name="extensionsDirectory" type="xs:string"/>
</xs:attributeGroup>
<xs:group name="configGroup">
<xs:all>
<xs:element ref="testSuiteFacet" minOccurs="0"/>
<xs:element name="groups" type="groupsType" minOccurs="0"/>
<xs:element name="testdoxGroups" type="groupsType" minOccurs="0"/>
<xs:element name="filter" type="filtersType" minOccurs="0"/>
<xs:element name="logging" type="loggersType" minOccurs="0"/>
<xs:element name="listeners" type="listenersType" minOccurs="0"/>
<xs:element name="php" type="phpType" minOccurs="0"/>
</xs:all>
</xs:group>
<xs:element name="testSuiteFacet" abstract="true"/>
<xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/>
<xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/>
<xs:complexType name="testSuitesType">
<xs:sequence>
<xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="testSuiteType">
<xs:sequence>
<xs:group ref="pathGroup"/>
<xs:element name="exclude" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
</xs:schema>

View File

@@ -83,8 +83,8 @@ class ArraySubset extends Constraint
$f = new ComparisonFailure(
$patched,
$other,
\print_r($patched, true),
\print_r($other, true)
\var_export($patched, true),
\var_export($other, true)
);
$this->fail($other, $description, $f);

View File

@@ -11,7 +11,8 @@ namespace PHPUnit\Framework\Constraint;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Util\InvalidArgumentHelper;
use SebastianBergmann;
use SebastianBergmann\Comparator\ComparisonFailure;
use SebastianBergmann\Comparator\Factory as ComparatorFactory;
/**
* Constraint that checks if one value is equal to another.
@@ -49,11 +50,6 @@ class IsEqual extends Constraint
*/
protected $ignoreCase = false;
/**
* @var SebastianBergmann\Comparator\ComparisonFailure
*/
protected $lastFailure;
/**
* @param mixed $value
* @param float $delta
@@ -117,7 +113,7 @@ class IsEqual extends Constraint
return true;
}
$comparatorFactory = SebastianBergmann\Comparator\Factory::getInstance();
$comparatorFactory = ComparatorFactory::getInstance();
try {
$comparator = $comparatorFactory->getComparatorFor(
@@ -132,7 +128,7 @@ class IsEqual extends Constraint
$this->canonicalize,
$this->ignoreCase
);
} catch (SebastianBergmann\Comparator\ComparisonFailure $f) {
} catch (ComparisonFailure $f) {
if ($returnResult) {
return false;
}
@@ -161,7 +157,7 @@ class IsEqual extends Constraint
}
return \sprintf(
'is equal to "%s"',
"is equal to '%s'",
$this->value
);
}

View File

@@ -10,7 +10,7 @@
namespace PHPUnit\Framework\Constraint;
use PHPUnit\Framework\ExpectationFailedException;
use SebastianBergmann;
use SebastianBergmann\Comparator\ComparisonFailure;
/**
* Constraint that asserts that one value is identical to another.
@@ -81,7 +81,7 @@ class IsIdentical extends Constraint
// if both values are strings, make sure a diff is generated
if (\is_string($this->value) && \is_string($other)) {
$f = new SebastianBergmann\Comparator\ComparisonFailure(
$f = new ComparisonFailure(
$this->value,
$other,
\sprintf("'%s'", $this->value),

View File

@@ -42,7 +42,6 @@ use Prophecy\Prophet;
use ReflectionClass;
use ReflectionException;
use ReflectionObject;
use SebastianBergmann;
use SebastianBergmann\Comparator\Comparator;
use SebastianBergmann\Comparator\Factory as ComparatorFactory;
use SebastianBergmann\Diff\Differ;
@@ -233,7 +232,7 @@ abstract class TestCase extends Assert implements Test, SelfDescribing
private $mockObjects = [];
/**
* @var array
* @var MockGenerator
*/
private $mockObjectGenerator;
@@ -293,7 +292,7 @@ abstract class TestCase extends Assert implements Test, SelfDescribing
private $outputBufferingLevel;
/**
* @var SebastianBergmann\GlobalState\Snapshot
* @var Snapshot
*/
private $snapshot;
@@ -756,7 +755,7 @@ abstract class TestCase extends Assert implements Test, SelfDescribing
*
* @param TestResult $result
*
* @return TestResult|null
* @return TestResult
*
* @throws Exception
*/
@@ -779,7 +778,7 @@ abstract class TestCase extends Assert implements Test, SelfDescribing
if (!$this instanceof WarningTestCase &&
!$this instanceof SkippedTestCase &&
!$this->handleDependencies()) {
return;
return $result;
}
$runEntireClass = $this->runClassInSeparateProcess && !$this->runTestInSeparateProcess;
@@ -875,7 +874,8 @@ abstract class TestCase extends Assert implements Test, SelfDescribing
'isStrictAboutTodoAnnotatedTests' => $isStrictAboutTodoAnnotatedTests,
'isStrictAboutResourceUsageDuringSmallTests' => $isStrictAboutResourceUsageDuringSmallTests,
'codeCoverageFilter' => $codeCoverageFilter,
'configurationFilePath' => $configurationFilePath
'configurationFilePath' => $configurationFilePath,
'name' => $this->getName(false),
];
if (!$runEntireClass) {
@@ -969,11 +969,6 @@ abstract class TestCase extends Assert implements Test, SelfDescribing
$e = $_e;
}
if (isset($_e)) {
$this->status = BaseTestRunner::STATUS_ERROR;
$this->statusMessage = $_e->getMessage();
}
// Clean up the mock objects.
$this->mockObjects = [];
$this->prophet = null;
@@ -1006,6 +1001,11 @@ abstract class TestCase extends Assert implements Test, SelfDescribing
}
}
if (isset($_e)) {
$this->status = BaseTestRunner::STATUS_ERROR;
$this->statusMessage = $_e->getMessage();
}
\clearstatcache();
if ($currentWorkingDirectory != \getcwd()) {
@@ -1640,7 +1640,8 @@ abstract class TestCase extends Assert implements Test, SelfDescribing
protected function getMockFromWsdl($wsdlFile, $originalClassName = '', $mockClassName = '', array $methods = [], $callOriginalConstructor = true, array $options = [])
{
if ($originalClassName === '') {
$originalClassName = \pathinfo(\basename(\parse_url($wsdlFile)['path']), PATHINFO_FILENAME);
$fileName = \pathinfo(\basename(\parse_url($wsdlFile)['path']), PATHINFO_FILENAME);
$originalClassName = \preg_replace('/[^a-zA-Z0-9_]/', '', $fileName);
}
if (!\class_exists($originalClassName)) {

View File

@@ -286,7 +286,7 @@ class TestSuite implements Test, SelfDescribing, IteratorAggregate
}
}
if (!$suiteMethod && !$testClass->isAbstract()) {
if (!$suiteMethod && !$testClass->isAbstract() && $testClass->isSubclassOf(TestCase::class)) {
$this->addTest(new self($testClass));
}
} else {
@@ -360,7 +360,7 @@ class TestSuite implements Test, SelfDescribing, IteratorAggregate
foreach ($newClasses as $className) {
$class = new ReflectionClass($className);
if (dirname($class->getFileName()) === __DIR__) {
if (\dirname($class->getFileName()) === __DIR__) {
continue;
}

View File

@@ -79,7 +79,7 @@ class NameFilterIterator extends RecursiveFilterIterator
// Escape delimiters in regular expression. Do NOT use preg_quote,
// to keep magic characters.
$filter = \sprintf('/%s/', \str_replace(
$filter = \sprintf('/%s/i', \str_replace(
'/',
'\\/',
$filter
@@ -89,10 +89,7 @@ class NameFilterIterator extends RecursiveFilterIterator
$this->filter = $filter;
}
/**
* @return bool
*/
public function accept()
public function accept(): bool
{
$test = $this->getInnerIterator()->current();
@@ -105,7 +102,7 @@ class NameFilterIterator extends RecursiveFilterIterator
if ($test instanceof WarningTestCase) {
$name = $test->getMessage();
} else {
if ($tmp[0] != '') {
if ($tmp[0] !== '') {
$name = \implode('::', $tmp);
} else {
$name = $tmp[1];
@@ -119,6 +116,6 @@ class NameFilterIterator extends RecursiveFilterIterator
$accepted = $set >= $this->filterMin && $set <= $this->filterMax;
}
return $accepted;
return (bool) $accepted;
}
}

View File

@@ -32,7 +32,7 @@ class Version
}
if (self::$version === null) {
$version = new VersionId('6.5.5', \dirname(\dirname(__DIR__)));
$version = new VersionId('6.5.14', \dirname(\dirname(__DIR__)));
self::$version = $version->getVersion();
}

View File

@@ -1036,6 +1036,7 @@ Code Coverage Options:
--coverage-xml <dir> Generate code coverage report in PHPUnit XML format.
--whitelist <dir> Whitelist <dir> for code coverage analysis.
--disable-coverage-ignore Disable annotations for ignoring code coverage.
--no-coverage Ignore code coverage configuration.
Logging Options:
@@ -1101,7 +1102,6 @@ Configuration Options:
--bootstrap <file> A "bootstrap" PHP file that is run before the tests.
-c|--configuration <file> Read configuration from XML file.
--no-configuration Ignore default configuration file (phpunit.xml).
--no-coverage Ignore code coverage configuration.
--no-logging Ignore logging configuration.
--no-extensions Do not load PHPUnit extensions.
--include-path <path(s)> Prepend PHP's include_path with given path(s).

View File

@@ -34,7 +34,6 @@ use PHPUnit\Util\TestDox\HtmlResultPrinter;
use PHPUnit\Util\TestDox\TextResultPrinter;
use PHPUnit\Util\TestDox\XmlResultPrinter;
use ReflectionClass;
use SebastianBergmann;
use SebastianBergmann\CodeCoverage\CodeCoverage;
use SebastianBergmann\CodeCoverage\Exception as CodeCoverageException;
use SebastianBergmann\CodeCoverage\Filter as CodeCoverageFilter;
@@ -44,6 +43,7 @@ use SebastianBergmann\CodeCoverage\Report\Html\Facade as HtmlReport;
use SebastianBergmann\CodeCoverage\Report\PHP as PhpReport;
use SebastianBergmann\CodeCoverage\Report\Text as TextReport;
use SebastianBergmann\CodeCoverage\Report\Xml\Facade as XmlReport;
use SebastianBergmann\Comparator\Comparator;
use SebastianBergmann\Environment\Runtime;
/**
@@ -190,8 +190,6 @@ class TestRunner extends BaseTestRunner
$this->handleConfiguration($arguments);
$this->processSuiteFilters($suite, $arguments);
if (isset($arguments['bootstrap'])) {
$GLOBALS['__PHPUNIT_BOOTSTRAP'] = $arguments['bootstrap'];
}
@@ -429,7 +427,7 @@ class TestRunner extends BaseTestRunner
);
$codeCoverage->setUnintentionallyCoveredSubclassesWhitelist(
[SebastianBergmann\Comparator\Comparator::class]
[Comparator::class]
);
$codeCoverage->setCheckForUnintentionallyCoveredCode(
@@ -540,6 +538,7 @@ class TestRunner extends BaseTestRunner
$result->setTimeoutForLargeTests($arguments['timeoutForLargeTests']);
if ($suite instanceof TestSuite) {
$this->processSuiteFilters($suite, $arguments);
$suite->setRunTestInSeparateProcess($arguments['processIsolation']);
}

View File

@@ -170,6 +170,9 @@ class Configuration
$this->xpath = new DOMXPath($this->document);
}
/**
* @codeCoverageIgnore
*/
final private function __clone()
{
}
@@ -565,6 +568,8 @@ class Configuration
\putenv("{$name}={$value}");
}
$value = \getenv($name);
if (!isset($_ENV[$name])) {
$_ENV[$name] = $value;
}

View File

@@ -362,10 +362,9 @@ class JUnit extends Printer implements TestListener
$this->testSuiteTimes[$this->testSuiteLevel] += $time;
if (\method_exists($test, 'hasOutput') && $test->hasOutput()) {
$systemOut = $this->document->createElement('system-out');
$systemOut->appendChild(
$this->document->createTextNode($test->getActualOutput())
$systemOut = $this->document->createElement(
'system-out',
Xml::prepareString($test->getActualOutput())
);
$this->currentTestCase->appendChild($systemOut);

View File

@@ -73,9 +73,10 @@ class TeamCity extends ResultPrinter
$this->printEvent(
'testFailed',
[
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'duration' => self::toMilliseconds($time),
]
);
}
@@ -92,9 +93,10 @@ class TeamCity extends ResultPrinter
$this->printEvent(
'testFailed',
[
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e)
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'duration' => self::toMilliseconds($time),
]
);
}
@@ -109,9 +111,10 @@ class TeamCity extends ResultPrinter
public function addFailure(Test $test, AssertionFailedError $e, $time)
{
$parameters = [
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'duration' => self::toMilliseconds($time),
];
if ($e instanceof ExpectationFailedException) {
@@ -150,7 +153,7 @@ class TeamCity extends ResultPrinter
*/
public function addIncompleteTest(Test $test, \Exception $e, $time)
{
$this->printIgnoredTest($test->getName(), $e);
$this->printIgnoredTest($test->getName(), $e, $time);
}
/**
@@ -177,21 +180,22 @@ class TeamCity extends ResultPrinter
$testName = $test->getName();
if ($this->startedTestName != $testName) {
$this->startTest($test);
$this->printIgnoredTest($testName, $e);
$this->printIgnoredTest($testName, $e, $time);
$this->endTest($test, $time);
} else {
$this->printIgnoredTest($testName, $e);
$this->printIgnoredTest($testName, $e, $time);
}
}
public function printIgnoredTest($testName, \Exception $e)
public function printIgnoredTest($testName, \Exception $e, $time)
{
$this->printEvent(
'testIgnored',
[
'name' => $testName,
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'name' => $testName,
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'duration' => self::toMilliseconds($time),
]
);
}
@@ -302,7 +306,7 @@ class TeamCity extends ResultPrinter
'testFinished',
[
'name' => $test->getName(),
'duration' => (int) (\round($time, 2) * 1000)
'duration' => self::toMilliseconds($time),
]
);
}
@@ -420,4 +424,14 @@ class TeamCity extends ResultPrinter
return $reflectionClass->getFileName();
}
/**
* @param float $time microseconds
*
* @return int
*/
private static function toMilliseconds($time)
{
return \round($time * 1000);
}
}

View File

@@ -47,7 +47,7 @@ function __phpunit_run_isolated_test()
$result->beStrictAboutTodoAnnotatedTests({isStrictAboutTodoAnnotatedTests});
$result->beStrictAboutResourceUsageDuringSmallTests({isStrictAboutResourceUsageDuringSmallTests});
$test = new {className}(null, unserialize('{data}'), '{dataName}');
$test = new {className}('{name}', unserialize('{data}'), '{dataName}');
$test->setDependencyInput(unserialize('{dependencyInput}'));
$test->setInIsolation(TRUE);

View File

@@ -54,7 +54,7 @@ class Printer
$this->out = \fsockopen($out[0], $out[1]);
} else {
if (\strpos($out, 'php://') === false && !\is_dir(\dirname($out))) {
\mkdir(\dirname($out), 0777, true);
$this->createDirectory(\dirname($out));
}
$this->out = \fopen($out, 'wt');
@@ -143,4 +143,9 @@ class Printer
throw InvalidArgumentHelper::factory(1, 'boolean');
}
}
private function createDirectory(string $directory): bool
{
return !(!\is_dir($directory) && !@\mkdir($directory, 0777, true) && !\is_dir($directory));
}
}

View File

@@ -37,7 +37,7 @@ class Test
const REGEX_REQUIRES_VERSION = '/@requires\s+(?P<name>PHP(?:Unit)?)\s+(?P<operator>[<>=!]{0,2})\s*(?P<version>[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m';
const REGEX_REQUIRES_VERSION_CONSTRAINT = '/@requires\s+(?P<name>PHP(?:Unit)?)\s+(?P<constraint>[\d\t -.|~^]+)[ \t]*\r?$/m';
const REGEX_REQUIRES_OS = '/@requires\s+(?P<name>OS(?:FAMILY)?)\s+(?P<value>.+?)[ \t]*\r?$/m';
const REGEX_REQUIRES = '/@requires\s+(?P<name>function|extension)\s+(?P<value>([^ ]+?))\s*(?P<operator>[<>=!]{0,2})\s*(?P<version>[\d\.-]+[\d\.]?)?[ \t]*\r?$/m';
const REGEX_REQUIRES = '/@requires\s+(?P<name>function|extension)\s+(?P<value>([^\s<>=!]+))\s*(?P<operator>[<>=!]{0,2})\s*(?P<version>[\d\.-]+[\d\.]?)?[ \t]*\r?$/m';
const UNKNOWN = -1;
const SMALL = 0;
@@ -967,22 +967,22 @@ class Test
$methodName
);
if (isset($annotations['class'][$settingName])) {
if ($annotations['class'][$settingName][0] == 'enabled') {
if (isset($annotations['method'][$settingName])) {
if ($annotations['method'][$settingName][0] === 'enabled') {
return true;
}
if ($annotations['class'][$settingName][0] == 'disabled') {
if ($annotations['method'][$settingName][0] === 'disabled') {
return false;
}
}
if (isset($annotations['method'][$settingName])) {
if ($annotations['method'][$settingName][0] == 'enabled') {
if (isset($annotations['class'][$settingName])) {
if ($annotations['class'][$settingName][0] === 'enabled') {
return true;
}
if ($annotations['method'][$settingName][0] == 'disabled') {
if ($annotations['class'][$settingName][0] === 'disabled') {
return false;
}
}

View File

@@ -1,40 +0,0 @@
<?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.
*/
namespace Framework\Constraint;
use PHPUnit\Framework\Constraint\Constraint;
use PHPUnit\Framework\Constraint\LogicalAnd;
use PHPUnit\Framework\TestCase;
final class LogicalAndTest extends TestCase
{
public function testFromConstraintsReturnsConstraint()
{
$other = 'Foo';
$count = 5;
$constraints = \array_map(function () use ($other) {
$constraint = $this->getMockBuilder(Constraint::class)->getMock();
$constraint
->expects($this->once())
->method('evaluate')
->with($this->identicalTo($other))
->willReturn(true);
return $constraint;
}, \array_fill(0, $count, null));
$constraint = LogicalAnd::fromConstraints(...$constraints);
$this->assertInstanceOf(LogicalAnd::class, $constraint);
$this->assertTrue($constraint->evaluate($other, '', true));
}
}

View File

@@ -1,40 +0,0 @@
<?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.
*/
namespace Framework\Constraint;
use PHPUnit\Framework\Constraint\Constraint;
use PHPUnit\Framework\Constraint\LogicalOr;
use PHPUnit\Framework\TestCase;
final class LogicalOrTest extends TestCase
{
public function testFromConstraintsReturnsConstraint()
{
$other = 'Foo';
$count = 5;
$constraints = \array_map(function () use ($other) {
$constraint = $this->getMockBuilder(Constraint::class)->getMock();
$constraint
->expects($this->once())
->method('evaluate')
->with($this->identicalTo($other))
->willReturn(false);
return $constraint;
}, \array_fill(0, $count, null));
$constraint = LogicalOr::fromConstraints(...$constraints);
$this->assertInstanceOf(LogicalOr::class, $constraint);
$this->assertFalse($constraint->evaluate($other, '', true));
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
<?php
use PHPUnit\Framework\Constraint\Constraint;
final class CountConstraint extends Constraint
{
/**
* @var int
*/
private $count;
public static function fromCount(int $count): self
{
$instance = new self();
$instance->count = $count;
return $instance;
}
public function matches($other)
{
return true;
}
public function toString()
{
return sprintf(
'is accepted by %s',
self::class
);
}
public function count()
{
return $this->count;
}
}

View File

@@ -0,0 +1,18 @@
<?php
use PHPUnit\Framework\Constraint\Constraint;
final class FalsyConstraint extends Constraint
{
public function matches($other)
{
return false;
}
public function toString()
{
return sprintf(
'is accepted by %s',
self::class
);
}
}

View File

@@ -0,0 +1,29 @@
<?php
use PHPUnit\Framework\Constraint\Constraint;
final class NamedConstraint extends Constraint
{
/**
* @var int
*/
private $name;
public static function fromName(string $name): self
{
$instance = new self();
$instance->name = $name;
return $instance;
}
public function matches($other)
{
return true;
}
public function toString()
{
return $this->name;
}
}

View File

@@ -79,6 +79,14 @@ class RequirementsTest extends TestCase
{
}
/**
* @requires function testFunc2
* @see https://github.com/sebastianbergmann/phpunit/issues/3459
*/
public function testRequiresFunctionWithDigit()
{
}
/**
* @requires OS SunOS
* @requires OSFAMILY Solaris
@@ -92,9 +100,9 @@ class RequirementsTest extends TestCase
* @requires PHPUnit 9-dev
* @requires OS DOESNOTEXIST
* @requires function testFuncOne
* @requires function testFuncTwo
* @requires function testFunc2
* @requires extension testExtOne
* @requires extension testExtTwo
* @requires extension testExt2
* @requires extension testExtThree 2.0
*/
public function testAllPossibleRequirements()

View File

@@ -0,0 +1,18 @@
<?php
use PHPUnit\Framework\Constraint\Constraint;
final class TruthyConstraint extends Constraint
{
public function matches($other)
{
return true;
}
public function toString()
{
return sprintf(
'is accepted by %s',
self::class
);
}
}

View File

@@ -1,7 +1,7 @@
<phpunit>
<testsuites>
<testsuite name="One File Suite">
<file>../../tests/TextUI/debug.phpt</file>
<file>../../tests/end-to-end/debug.phpt</file>
</testsuite>
</testsuites>
</phpunit>

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<phpunit backupGlobals="true"
backupStaticAttributes="false"
bootstrap="/path/to/bootstrap.php"
@@ -32,95 +31,101 @@
timeoutForMediumTests="10"
timeoutForLargeTests="60"
verbose="false">
<testsuites>
<testsuite name="My Test Suite">
<directory suffix="Test.php" phpVersion="5.3.0" phpVersionOperator=">=">/path/to/files</directory>
<file phpVersion="5.3.0" phpVersionOperator=">=">/path/to/MyTest.php</file>
</testsuite>
</testsuites>
<testsuites>
<testsuite name="My Test Suite">
<directory suffix="Test.php" phpVersion="5.3.0" phpVersionOperator=">=">/path/to/files</directory>
<file phpVersion="5.3.0" phpVersionOperator=">=">/path/to/MyTest.php</file>
</testsuite>
</testsuites>
<groups>
<include>
<group>name</group>
</include>
<exclude>
<group>name</group>
</exclude>
</groups>
<groups>
<include>
<group>name</group>
</include>
<exclude>
<group>name</group>
</exclude>
</groups>
<testdoxGroups>
<include>
<group>name</group>
</include>
<exclude>
<group>name</group>
</exclude>
</testdoxGroups>
<testdoxGroups>
<include>
<group>name</group>
</include>
<exclude>
<group>name</group>
</exclude>
</testdoxGroups>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true"
processUncoveredFilesFromWhitelist="false">
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
<file>
/path/to/file
</file>
<exclude>
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
</exclude>
</whitelist>
</filter>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true"
processUncoveredFilesFromWhitelist="false">
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
<file>
/path/to/file
</file>
<exclude>
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
</exclude>
</whitelist>
</filter>
<listeners>
<listener class="MyListener" file="/optional/path/to/MyListener.php">
<arguments>
<array>
<element key="0">
<string>Sebastian</string>
</element>
</array>
<integer>22</integer>
<string>April</string>
<double>19.78</double>
<null/>
<object class="stdClass"/>
<file>MyTestFile.php</file>
<directory>MyRelativePath</directory>
</arguments>
</listener>
<listener class="IncludePathListener" file="ConfigurationTest.php" />
<listener class="CompactArgumentsListener" file="/CompactArgumentsListener.php"><arguments><integer>42</integer></arguments></listener>
</listeners>
<listeners>
<listener class="MyListener" file="/optional/path/to/MyListener.php">
<arguments>
<array>
<element key="0">
<string>Sebastian</string>
</element>
</array>
<integer>22</integer>
<string>April</string>
<double>19.78</double>
<null/>
<object class="stdClass"/>
<file>MyTestFile.php</file>
<directory>MyRelativePath</directory>
</arguments>
</listener>
<listener class="IncludePathListener" file="ConfigurationTest.php"/>
<listener class="CompactArgumentsListener" file="/CompactArgumentsListener.php">
<arguments>
<integer>42</integer>
</arguments>
</listener>
</listeners>
<logging>
<log type="coverage-html" target="/tmp/report" lowUpperBound="50" highLowerBound="90"/>
<log type="coverage-clover" target="/tmp/clover.xml"/>
<log type="json" target="/tmp/logfile.json"/>
<log type="plain" target="/tmp/logfile.txt"/>
<log type="tap" target="/tmp/logfile.tap"/>
<log type="junit" target="/tmp/logfile.xml"/>
<log type="testdox-html" target="/tmp/testdox.html"/>
<log type="testdox-text" target="/tmp/testdox.txt"/>
<log type="testdox-xml" target="/tmp/testdox.xml"/>
</logging>
<logging>
<log type="coverage-html" target="/tmp/report" lowUpperBound="50" highLowerBound="90"/>
<log type="coverage-clover" target="/tmp/clover.xml"/>
<log type="coverage-crap4j" threshold="50" target="/tmp/crap4j.xml"/>
<log type="coverage-text" showUncoveredFiles="true" showOnlySummary="true" target="/tmp/coverage.txt"/>
<log type="json" target="/tmp/logfile.json"/>
<log type="plain" target="/tmp/logfile.txt"/>
<log type="tap" target="/tmp/logfile.tap"/>
<log type="junit" target="/tmp/logfile.xml"/>
<log type="testdox-html" target="/tmp/testdox.html"/>
<log type="testdox-text" target="/tmp/testdox.txt"/>
<log type="testdox-xml" target="/tmp/testdox.xml"/>
</logging>
<php>
<includePath>.</includePath>
<includePath>/path/to/lib</includePath>
<ini name="foo" value="bar"/>
<const name="FOO" value="false"/>
<const name="BAR" value="true"/>
<var name="foo" value="false"/>
<env name="foo" value="true"/>
<env name="foo_force" value="forced" force="true"/>
<env name="bar" value="true" verbatim="true"/>
<post name="foo" value="bar"/>
<get name="foo" value="bar"/>
<cookie name="foo" value="bar"/>
<server name="foo" value="bar"/>
<files name="foo" value="bar"/>
<request name="foo" value="bar"/>
</php>
<php>
<includePath>.</includePath>
<includePath>/path/to/lib</includePath>
<ini name="foo" value="bar"/>
<const name="FOO" value="false"/>
<const name="BAR" value="true"/>
<var name="foo" value="false"/>
<env name="foo" value="true"/>
<env name="foo_force" value="forced" force="true"/>
<env name="bar" value="true" verbatim="true"/>
<post name="foo" value="bar"/>
<get name="foo" value="bar"/>
<cookie name="foo" value="bar"/>
<server name="foo" value="bar"/>
<files name="foo" value="bar"/>
<request name="foo" value="bar"/>
</php>
</phpunit>

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit AbstractTest ../_files/AbstractTest.php
phpunit AbstractTest ../../_files/AbstractTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit AssertionExampleTest ../_files/AssertionExampleTest.php
phpunit AssertionExampleTest ../../_files/AssertionExampleTest.php
--SKIPIF--
<?php
if (PHP_MAJOR_VERSION < 7) {

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --colors=never --coverage-text=php://stdout IgnoreCodeCoverageClassTest ../_files/IgnoreCodeCoverageClassTest.php --whitelist ../../tests/_files/IgnoreCodeCoverageClass.php
phpunit --colors=never --coverage-text=php://stdout IgnoreCodeCoverageClassTest ../../_files/IgnoreCodeCoverageClassTest.php --whitelist ../../../tests/_files/IgnoreCodeCoverageClass.php
--SKIPIF--
<?php
if (!extension_loaded('xdebug')) {

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --colors=never --coverage-text=php://stdout ../_files/phpt-for-coverage.phpt --whitelist ../_files/CoveredClass.php
phpunit --colors=never --coverage-text=php://stdout ../../_files/phpt-for-coverage.phpt --whitelist ../../_files/CoveredClass.php
--SKIPIF--
<?php
if (!extension_loaded('xdebug')) {

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --colors=always BankAccountTest ../_files/BankAccountTest.php
phpunit --colors=always BankAccountTest ../../_files/BankAccountTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit ConcreteTest ../_files/ConcreteTest.php
phpunit ConcreteTest ../../_files/ConcreteTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit -c ../_files/configuration.custom-printer.xml --debug BankAccountTest ../_files/BankAccountTest.php
phpunit -c ../../_files/configuration.custom-printer.xml --debug BankAccountTest ../../_files/BankAccountTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '-c';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit -c ../_files/configuration.custom-printer.xml --verbose IncompleteTest ../_files/IncompleteTest.php
phpunit -c ../../_files/configuration.custom-printer.xml --verbose IncompleteTest ../../_files/IncompleteTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '-c';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --debug DataProviderDebugTest ../_files/DataProviderDebugTest.php
phpunit --debug DataProviderDebugTest ../../_files/DataProviderDebugTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit ../_files/DataProviderIssue2833
phpunit ../../_files/DataProviderIssue2833
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit -c ../_files/DataProviderIssue2859/phpunit.xml
phpunit -c ../../_files/DataProviderIssue2859/phpunit.xml
--FILE--
<?php
$_SERVER['argv'][1] = '-c';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --exclude-group=foo ../_files/DataProviderIssue2922
phpunit --exclude-group=foo ../../_files/DataProviderIssue2922
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --process-isolation --log-junit php://stdout DataProviderTest ../_files/DataProviderTest.php
phpunit --process-isolation --log-junit php://stdout DataProviderTest ../../_files/DataProviderTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --log-junit php://stdout DataProviderTest ../_files/DataProviderTest.php
phpunit --log-junit php://stdout DataProviderTest ../../_files/DataProviderTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit DataProviderTestDoxTest ../_files/DataProviderTestDoxTest.php
phpunit DataProviderTestDoxTest ../../_files/DataProviderTestDoxTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --debug BankAccountTest ../_files/BankAccountTest.php
phpunit --debug BankAccountTest ../../_files/BankAccountTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --process-isolation BankAccountTest ../_files/BankAccountTest.php
phpunit --process-isolation BankAccountTest ../../_files/BankAccountTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit BankAccountTest ../_files/BankAccountTest.php
phpunit BankAccountTest ../../_files/BankAccountTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --verbose ClonedDependencyTest ../_files/ClonedDependencyTest.php
phpunit --verbose ClonedDependencyTest ../../_files/ClonedDependencyTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --process-isolation --verbose DependencyTestSuite ../_files/DependencyTestSuite.php
phpunit --process-isolation --verbose DependencyTestSuite ../../_files/DependencyTestSuite.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --verbose DependencyTestSuite ../_files/DependencyTestSuite.php
phpunit --verbose DependencyTestSuite ../../_files/DependencyTestSuite.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --process-isolation StackTest ../_files/StackTest.php
phpunit --process-isolation StackTest ../../_files/StackTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit StackTest ../_files/StackTest.php
phpunit StackTest ../../_files/StackTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --process-isolation MultiDependencyTest ../_files/MultiDependencyTest.php
phpunit --process-isolation MultiDependencyTest ../../_files/MultiDependencyTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit MultiDependencyTest ../_files/MultiDependencyTest.php
phpunit MultiDependencyTest ../../_files/MultiDependencyTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --colors=never --coverage-text=php://stdout --disable-coverage-ignore IgnoreCodeCoverageClassTest tests/_files/IgnoreCodeCoverageClassTest.php --whitelist ../../tests/_files/IgnoreCodeCoverageClass.php
phpunit --colors=never --coverage-text=php://stdout --disable-coverage-ignore IgnoreCodeCoverageClassTest tests/_files/IgnoreCodeCoverageClassTest.php --whitelist ../../../tests/_files/IgnoreCodeCoverageClass.php
--SKIPIF--
<?php
if (!extension_loaded('xdebug')) {

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit EmptyTestCaseTest ../_files/EmptyTestCaseTest.php
phpunit EmptyTestCaseTest ../../_files/EmptyTestCaseTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit ExceptionStackTest ../_files/ExceptionStackTest.php
phpunit ExceptionStackTest ../../_files/ExceptionStackTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --process-isolation --exclude-group balanceIsInitiallyZero BankAccountTest ../_files/BankAccountTest.php
phpunit --process-isolation --exclude-group balanceIsInitiallyZero BankAccountTest ../../_files/BankAccountTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --exclude-group balanceIsInitiallyZero BankAccountTest ../_files/BankAccountTest.php
phpunit --exclude-group balanceIsInitiallyZero BankAccountTest ../../_files/BankAccountTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --process-isolation FailureTest ../_files/FailureTest.php
phpunit --process-isolation FailureTest ../../_files/FailureTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --reverse-list FailureTest ../_files/FailureTest.php
phpunit --reverse-list FailureTest ../../_files/FailureTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit FailureTest ../_files/FailureTest.php
phpunit FailureTest ../../_files/FailureTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit FatalTest --process-isolation ../_files/FatalTest.php
phpunit FatalTest --process-isolation ../../_files/FatalTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --process-isolation --filter BankAccountTest BankAccountTest ../_files/BankAccountTest.php
phpunit --process-isolation --filter BankAccountTest BankAccountTest ../../_files/BankAccountTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --filter BankAccountTest BankAccountTest ../_files/BankAccountTest.php
phpunit --filter BankAccountTest BankAccountTest ../../_files/BankAccountTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --process-isolation --filter DataProviderFilterTest#1-3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
phpunit --process-isolation --filter DataProviderFilterTest#1-3 DataProviderFilterTest ../../_files/DataProviderFilterTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --filter DataProviderFilterTest#1-3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
phpunit --filter DataProviderFilterTest#1-3 DataProviderFilterTest ../../_files/DataProviderFilterTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --process-isolation --filter testTrue#3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
phpunit --process-isolation --filter testTrue#3 DataProviderFilterTest ../../_files/DataProviderFilterTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

View File

@@ -1,5 +1,5 @@
--TEST--
phpunit --filter testTrue#3 DataProviderFilterTest ../_files/DataProviderFilterTest.php
phpunit --filter testTrue#3 DataProviderFilterTest ../../_files/DataProviderFilterTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';

Some files were not shown because too many files have changed in this diff Show More