Upgrade framework
This commit is contained in:
4
vendor/phpunit/phpunit/.gitattributes
vendored
4
vendor/phpunit/phpunit/.gitattributes
vendored
@@ -1,4 +0,0 @@
|
||||
/build export-ignore
|
||||
|
||||
*.php diff=php
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# Contributor Code of Conduct
|
||||
|
||||
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
||||
|
||||
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery
|
||||
* Personal attacks
|
||||
* Trolling or insulting/derogatory comments
|
||||
* Public or private harassment
|
||||
* Publishing other's private information, such as physical or electronic
|
||||
addresses, without explicit permission
|
||||
* Other unethical or unprofessional conduct
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainer at sebastian@phpunit.de. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.3.0, available at [http://contributor-covenant.org/version/1/3/0/][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/3/0/
|
||||
72
vendor/phpunit/phpunit/.github/CONTRIBUTING.md
vendored
72
vendor/phpunit/phpunit/.github/CONTRIBUTING.md
vendored
@@ -1,72 +0,0 @@
|
||||
# Contributing to PHPUnit
|
||||
|
||||
## Contributor Code of Conduct
|
||||
|
||||
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
||||
|
||||
## Workflow
|
||||
|
||||
* Fork the project.
|
||||
* Make your bug fix or feature addition.
|
||||
* Add tests for it. This is important so we don't break it in a future version unintentionally.
|
||||
* Send a pull request. Bonus points for topic branches.
|
||||
|
||||
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.
|
||||
|
||||
We are trying to keep backwards compatibility breaks in PHPUnit to an absolute minimum. Please take this into account when proposing changes.
|
||||
|
||||
Due to time constraints, we are not always able to respond as quickly as we would like. Please do not take delays personal and feel free to remind us if you feel that we forgot to respond.
|
||||
|
||||
## 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:
|
||||
|
||||
```bash
|
||||
$ wget http://get.sensiolabs.org/php-cs-fixer.phar
|
||||
|
||||
$ php php-cs-fixer.phar fix
|
||||
```
|
||||
|
||||
## Using PHPUnit from a Git checkout
|
||||
|
||||
The following commands can be used to perform the initial checkout of PHPUnit:
|
||||
|
||||
```bash
|
||||
$ git clone git://github.com/sebastianbergmann/phpunit.git
|
||||
|
||||
$ cd phpunit
|
||||
```
|
||||
|
||||
Retrieve PHPUnit's dependencies using [Composer](https://getcomposer.org/):
|
||||
|
||||
```bash
|
||||
$ composer install
|
||||
```
|
||||
|
||||
The `phpunit` script can be used to invoke the PHPUnit test runner:
|
||||
|
||||
```bash
|
||||
$ ./phpunit --version
|
||||
```
|
||||
|
||||
## Running PHPUnit's own test suite
|
||||
|
||||
After following the steps shown above, PHPUnit's own test suite is run like this:
|
||||
|
||||
```bash
|
||||
$ ./phpunit
|
||||
```
|
||||
|
||||
## Reporting issues
|
||||
|
||||
Please use the most specific issue tracker to search for existing tickets and to open new tickets:
|
||||
|
||||
* [General problems](https://github.com/sebastianbergmann/phpunit/issues)
|
||||
* [Code Coverage](https://github.com/sebastianbergmann/php-code-coverage/issues)
|
||||
* [Stub and Mock Objects](https://github.com/sebastianbergmann/phpunit-mock-objects/issues)
|
||||
* [DbUnit](https://github.com/sebastianbergmann/dbunit/issues)
|
||||
* [Documentation](https://github.com/sebastianbergmann/phpunit-documentation/issues)
|
||||
* [Website](https://github.com/sebastianbergmann/phpunit-website/issues)
|
||||
|
||||
14
vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE.md
vendored
14
vendor/phpunit/phpunit/.github/ISSUE_TEMPLATE.md
vendored
@@ -1,14 +0,0 @@
|
||||
| Q | A
|
||||
| --------------------| ---------------
|
||||
| PHPUnit version | x.y.z
|
||||
| PHP version | x.y.z
|
||||
| Installation Method | Composer / PHAR
|
||||
|
||||
<!--
|
||||
- Please fill in this template according to your issue.
|
||||
- Please keep the table shown above at the top of your issue.
|
||||
- Please post code as text (using proper markup). Do not post screenshots of code.
|
||||
- For support request or how-tos, visit https://phpunit.de/support.html
|
||||
- Otherwise, replace this comment by the description of your issue.
|
||||
-->
|
||||
|
||||
18
vendor/phpunit/phpunit/.gitignore
vendored
18
vendor/phpunit/phpunit/.gitignore
vendored
@@ -1,18 +0,0 @@
|
||||
/.ant_targets
|
||||
/.idea
|
||||
/build/documentation
|
||||
/build/logfiles
|
||||
/build/phar
|
||||
/build/phpdox
|
||||
/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
|
||||
/vendor
|
||||
/.php_cs.cache
|
||||
81
vendor/phpunit/phpunit/.php_cs
vendored
81
vendor/phpunit/phpunit/.php_cs
vendored
@@ -1,81 +0,0 @@
|
||||
<?php
|
||||
$header = <<<'EOF'
|
||||
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.
|
||||
EOF;
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setRiskyAllowed(true)
|
||||
->setRules(
|
||||
[
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'binary_operator_spaces' => [
|
||||
'align_double_arrow' => true,
|
||||
'align_equals' => true
|
||||
],
|
||||
'blank_line_after_namespace' => true,
|
||||
'blank_line_before_return' => true,
|
||||
'braces' => true,
|
||||
'cast_spaces' => true,
|
||||
'concat_space' => ['spacing' => 'one'],
|
||||
'elseif' => true,
|
||||
'encoding' => true,
|
||||
'full_opening_tag' => true,
|
||||
'function_declaration' => true,
|
||||
'header_comment' => ['header' => $header, 'separate' => 'none'],
|
||||
'indentation_type' => true,
|
||||
'line_ending' => true,
|
||||
'lowercase_constants' => true,
|
||||
'lowercase_keywords' => true,
|
||||
'method_argument_space' => true,
|
||||
'no_alias_functions' => true,
|
||||
'no_blank_lines_after_class_opening' => true,
|
||||
'no_blank_lines_after_phpdoc' => true,
|
||||
'no_closing_tag' => true,
|
||||
'no_empty_phpdoc' => true,
|
||||
'no_empty_statement' => true,
|
||||
'no_extra_consecutive_blank_lines' => true,
|
||||
'no_leading_namespace_whitespace' => true,
|
||||
'no_singleline_whitespace_before_semicolons' => true,
|
||||
'no_spaces_after_function_name' => true,
|
||||
'no_spaces_inside_parenthesis' => true,
|
||||
'no_trailing_comma_in_list_call' => true,
|
||||
'no_trailing_whitespace' => true,
|
||||
'no_unused_imports' => true,
|
||||
'no_whitespace_in_blank_line' => true,
|
||||
'phpdoc_align' => true,
|
||||
'phpdoc_indent' => true,
|
||||
'phpdoc_no_access' => true,
|
||||
'phpdoc_no_empty_return' => true,
|
||||
'phpdoc_no_package' => true,
|
||||
'phpdoc_scalar' => true,
|
||||
'phpdoc_separation' => true,
|
||||
'phpdoc_to_comment' => true,
|
||||
'phpdoc_trim' => true,
|
||||
'phpdoc_types' => true,
|
||||
'phpdoc_var_without_name' => true,
|
||||
'self_accessor' => true,
|
||||
'simplified_null_return' => true,
|
||||
'single_blank_line_at_eof' => true,
|
||||
'single_import_per_statement' => true,
|
||||
'single_line_after_imports' => true,
|
||||
'single_quote' => true,
|
||||
'ternary_operator_spaces' => true,
|
||||
'trim_array_spaces' => true,
|
||||
'visibility_required' => true,
|
||||
]
|
||||
)
|
||||
->setFinder(
|
||||
PhpCsFixer\Finder::create()
|
||||
->files()
|
||||
->in(__DIR__ . '/build')
|
||||
->in(__DIR__ . '/src')
|
||||
->in(__DIR__ . '/tests/Framework')
|
||||
->in(__DIR__ . '/tests/Runner')
|
||||
->in(__DIR__ . '/tests/Util')
|
||||
->name('*.php')
|
||||
);
|
||||
33
vendor/phpunit/phpunit/.phpstorm.meta.php
vendored
Normal file
33
vendor/phpunit/phpunit/.phpstorm.meta.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace PHPSTORM_META {
|
||||
|
||||
override(
|
||||
\PHPUnit\Framework\TestCase::createMock(0),
|
||||
map([""=>"$0"])
|
||||
);
|
||||
|
||||
override(
|
||||
\PHPUnit\Framework\TestCase::createStub(0),
|
||||
map([""=>"$0"])
|
||||
);
|
||||
|
||||
override(
|
||||
\PHPUnit\Framework\TestCase::createConfiguredMock(0),
|
||||
map([""=>"$0"])
|
||||
);
|
||||
|
||||
override(
|
||||
\PHPUnit\Framework\TestCase::createPartialMock(0),
|
||||
map([""=>"$0"])
|
||||
);
|
||||
|
||||
override(
|
||||
\PHPUnit\Framework\TestCase::createTestProxy(0),
|
||||
map([""=>"$0"])
|
||||
);
|
||||
|
||||
override(
|
||||
\PHPUnit\Framework\TestCase::getMockForAbstractClass(0),
|
||||
map([""=>"$0"])
|
||||
);
|
||||
}
|
||||
3
vendor/phpunit/phpunit/.stickler.yml
vendored
3
vendor/phpunit/phpunit/.stickler.yml
vendored
@@ -1,3 +0,0 @@
|
||||
linters:
|
||||
phpcs:
|
||||
standard: 'build/phpcs.xml'
|
||||
41
vendor/phpunit/phpunit/.travis.yml
vendored
41
vendor/phpunit/phpunit/.travis.yml
vendored
@@ -1,41 +0,0 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- nightly
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- DEPENDENCIES="high"
|
||||
- DEPENDENCIES="low"
|
||||
|
||||
sudo: false
|
||||
|
||||
before_install:
|
||||
- composer self-update
|
||||
- composer clear-cache
|
||||
|
||||
install:
|
||||
- if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable; fi
|
||||
- if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable --prefer-lowest; fi
|
||||
|
||||
before_script:
|
||||
- echo 'zend.assertions=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
- echo 'assert.exception=On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
|
||||
script:
|
||||
- ./phpunit --coverage-clover=coverage.xml
|
||||
- ./phpunit --configuration ./build/travis-ci-fail.xml > /dev/null; if [ $? -eq 0 ]; then echo "SHOULD FAIL"; false; else echo "fail checked"; fi;
|
||||
- xmllint --noout --schema phpunit.xsd phpunit.xml
|
||||
- xmllint --noout --schema phpunit.xsd tests/_files/configuration.xml
|
||||
- xmllint --noout --schema phpunit.xsd tests/_files/configuration_empty.xml
|
||||
- xmllint --noout --schema phpunit.xsd tests/_files/configuration_xinclude.xml -xinclude
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
176
vendor/phpunit/phpunit/ChangeLog-4.0.md
vendored
176
vendor/phpunit/phpunit/ChangeLog-4.0.md
vendored
@@ -1,176 +0,0 @@
|
||||
# Changes in PHPUnit 4.0
|
||||
|
||||
All notable changes of the PHPUnit 4.0 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [4.0.20] - 2014-05-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1242](https://github.com/sebastianbergmann/phpunit/issues/1242): `--self-update` uses OpenSSL API that is deprecated in PHP 5.6
|
||||
|
||||
## [4.0.19] - 2014-04-30
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1193](https://github.com/sebastianbergmann/phpunit/issues/1193): Process isolation does not work correctly when PHPUnit is used from PHAR
|
||||
* Fixed a BC break related to comparing `DOMNode` objects that was introduced in PHPUnit 4.0.18
|
||||
|
||||
## [4.0.18] - 2014-04-29
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1218](https://github.com/sebastianbergmann/phpunit/issues/1218): `--self-update` destroys symlink
|
||||
|
||||
## [4.0.17] - 2014-04-21
|
||||
|
||||
### Changed
|
||||
|
||||
* [Display a message that the PEAR installation method is no longer supported when PHPUnit was installed using the PEAR Installer](https://github.com/sebastianbergmann/phpunit/commit/70b02c6be0176ab8ad3d3c9ec97480556c5dd63b)
|
||||
|
||||
## [4.0.16] - 2014-04-20
|
||||
|
||||
### Fixed
|
||||
|
||||
* [Fixed handling of the `--report-useless-tests`, `--strict-coverage`, `--disallow-test-output`, and `--enforce-time-limit` options](https://github.com/sebastianbergmann/phpunit/commit/38baa9670711adedfe44ef24a33b568f61f3f045)
|
||||
|
||||
## [4.0.15] - 2014-04-16
|
||||
|
||||
New release of PHPUnit as PHAR and PEAR package with updated dependencies
|
||||
|
||||
## [4.0.14] - 2014-03-28
|
||||
|
||||
New release of PHPUnit as PHAR and PEAR package with updated dependencies
|
||||
|
||||
## [4.0.13] - 2014-03-26
|
||||
|
||||
New release of PHPUnit as PHAR and PEAR package with updated dependencies
|
||||
|
||||
## [4.0.12] - 2014-03-20
|
||||
|
||||
### Changed
|
||||
|
||||
* [Use blacklist from PHP_CodeCoverage](https://github.com/sebastianbergmann/phpunit/commit/16152ba4b8d0104ce34f60cb71b2b982ba84c898)
|
||||
|
||||
## [4.0.11] - 2014-03-18
|
||||
|
||||
### Fixed
|
||||
|
||||
* [Fixed unintended autoloader invokation triggered by the `@beforeClass` and `@afterClass` annotations](https://github.com/sebastianbergmann/phpunit/commit/f12e10fddc3ccbddb652a04d9036aeb5a6d54bff)
|
||||
|
||||
## [4.0.10] - 2014-03-18
|
||||
|
||||
New release of PHPUnit as PHAR and PEAR package with updated dependencies (most notably a [fix](https://github.com/sebastianbergmann/phpunit-mock-objects/commit/c5e6274b8f2bf983cf883bb375cf44f99aff200e) in the mock object generator that caused a [performance regression](https://github.com/sebastianbergmann/phpunit/issues/1187))
|
||||
|
||||
## [4.0.9] - 2014-03-17
|
||||
|
||||
### Changed
|
||||
|
||||
* Optimized the search for the `@before`, `@after`, `@beforeClass` and `@afterClass` annotations
|
||||
* Optimized the usage of `SebastianBergmann\Environment\Runtime::canCollectCodeCoverage()`
|
||||
|
||||
### Fixed
|
||||
|
||||
* The "No code coverage will be generated." message was displayed even when code coverage reporting was not requested
|
||||
|
||||
## [4.0.8] - 2014-03-17
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1186](https://github.com/sebastianbergmann/phpunit/issues/1186): `@before` and `@after` methods are not called in `@dataProvider` methods
|
||||
|
||||
## [4.0.7] - 2014-03-12
|
||||
|
||||
### Fixed
|
||||
|
||||
* Removed dependency on `phpunit/dbunit` in `composer.json` that was unintentionally added in PHPUnit 4.0.6
|
||||
|
||||
## [4.0.6] - 2014-03-11
|
||||
|
||||
New release of PHPUnit as PHAR and PEAR package with updated dependencies
|
||||
|
||||
## [4.0.5] - 2014-03-10
|
||||
|
||||
New release of PHPUnit as PHAR and PEAR package with updated dependencies
|
||||
|
||||
## [4.0.4] - 2014-03-08
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed stacktrace filtering when PHPUnit is used from a PHAR
|
||||
|
||||
## [4.0.3] - 2014-03-07
|
||||
|
||||
New release of PHPUnit as PHAR and PEAR package with updated dependencies
|
||||
|
||||
## [4.0.2] - 2014-03-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed an issue related to displaying PHPUnit's version number
|
||||
|
||||
## [4.0.1] - 2014-03-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed collection of code coverage data for tests that use a data provider
|
||||
|
||||
## [4.0.0] - 2014-03-07
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented #382: Added the `$options` parameter to `PHPUnit_Framework_TestCase::getMockFromWsdl()` for configuring the `SoapClient`
|
||||
* Implemented #628: Added `PHPUnit_Framework_Assert::countOf(), a shortcut to get a `PHPUnit_Framework_Constraint_Count` instance
|
||||
* Implemented #711: `coverage-text` now has an XML `showOnlySummary` option
|
||||
* Implemented #719: The `--stderr` switch now respects `--colors` and `--debug`
|
||||
* Implemented #746: Allow identity checking for non-object types in all asserts that depend on `TraversableContains`
|
||||
* Implemented #758: Show a proper stack trace when @expectedException fails due to a unexpected exception being thrown
|
||||
* Implemented #773: Recursive and repeated arrays are more gracefully when comparison differences are exported
|
||||
* Implemented #813: Added `@before`, `@after`, `@beforeClass` and `@afterClass` annotations
|
||||
* Implemented #834: Added the `@requires OS` annotation
|
||||
* Implemented #835: Printers that extend `PHPUnit_TextUI_ResultPrinter` should have similar construction
|
||||
* Implemented #838: Added a base test listener
|
||||
* Implemented #859: Added PHP label validation to attribute assertions
|
||||
* Implemented #869: Added support for the adjacent sibling selector (+) to `PHPUnit_Util_XML::findNodes()`
|
||||
* Implemented #871: Add Comparator for DateTime objects
|
||||
* Implemented #877: Added new HTML5 tags to `PHPUnit_Util_XML::findNodes()`
|
||||
* Added `--coverage-crap4j` switch to generate code coverage report in Crap4J XML format
|
||||
* `assertCount()`, `assertNotCount()`, `assertSameSize()`, and `assertNotSameSize()` now support all objects that implement the `Traversable` interface
|
||||
|
||||
### Changed
|
||||
|
||||
* A test will now fail in strict mode when it uses the `@covers` annotation and code that is not expected to be covered is executed
|
||||
* All relative paths in a configuration file are now resolved relative to that configuration file
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed #240: XML strings are escaped by removing invalid characters
|
||||
* Fixed #261: `setUp()` and `setUpBeforeClass()` are run before filters are applied
|
||||
* Fixed #541: Excluded groups are counted towards total number of tests being executed
|
||||
* Fixed #789: PHP INI settings would not be passed to child processes
|
||||
* Fixed #806: Array references are now properly displayed in error output
|
||||
* Fixed #808: Resources are now reported as `resource(13) of type (stream)` instead of `NULL`
|
||||
* Fixed #873: PHPUnit suppresses exceptions thrown outside of test case function
|
||||
* Fixed: `phpt` test cases now use the correct php binary when executed through wrapper scripts
|
||||
|
||||
[4.0.20]: https://github.com/sebastianbergmann/phpunit/compare/4.0.19...4.0.20
|
||||
[4.0.19]: https://github.com/sebastianbergmann/phpunit/compare/4.0.18...4.0.19
|
||||
[4.0.18]: https://github.com/sebastianbergmann/phpunit/compare/4.0.17...4.0.18
|
||||
[4.0.17]: https://github.com/sebastianbergmann/phpunit/compare/4.0.16...4.0.17
|
||||
[4.0.16]: https://github.com/sebastianbergmann/phpunit/compare/4.0.15...4.0.16
|
||||
[4.0.15]: https://github.com/sebastianbergmann/phpunit/compare/4.0.14...4.0.15
|
||||
[4.0.14]: https://github.com/sebastianbergmann/phpunit/compare/4.0.13...4.0.14
|
||||
[4.0.13]: https://github.com/sebastianbergmann/phpunit/compare/4.0.12...4.0.13
|
||||
[4.0.12]: https://github.com/sebastianbergmann/phpunit/compare/4.0.11...4.0.12
|
||||
[4.0.11]: https://github.com/sebastianbergmann/phpunit/compare/4.0.10...4.0.11
|
||||
[4.0.10]: https://github.com/sebastianbergmann/phpunit/compare/4.0.9...4.0.10
|
||||
[4.0.9]: https://github.com/sebastianbergmann/phpunit/compare/4.0.8...4.0.9
|
||||
[4.0.8]: https://github.com/sebastianbergmann/phpunit/compare/4.0.7...4.0.8
|
||||
[4.0.7]: https://github.com/sebastianbergmann/phpunit/compare/4.0.6...4.0.7
|
||||
[4.0.6]: https://github.com/sebastianbergmann/phpunit/compare/4.0.5...4.0.6
|
||||
[4.0.5]: https://github.com/sebastianbergmann/phpunit/compare/4.0.4...4.0.5
|
||||
[4.0.4]: https://github.com/sebastianbergmann/phpunit/compare/4.0.3...4.0.4
|
||||
[4.0.3]: https://github.com/sebastianbergmann/phpunit/compare/4.0.2...4.0.3
|
||||
[4.0.2]: https://github.com/sebastianbergmann/phpunit/compare/4.0.1...4.0.2
|
||||
[4.0.1]: https://github.com/sebastianbergmann/phpunit/compare/4.0.0...4.0.1
|
||||
[4.0.0]: https://github.com/sebastianbergmann/phpunit/compare/3.7...4.0.0
|
||||
|
||||
73
vendor/phpunit/phpunit/ChangeLog-4.1.md
vendored
73
vendor/phpunit/phpunit/ChangeLog-4.1.md
vendored
@@ -1,73 +0,0 @@
|
||||
# Changes in PHPUnit 4.1
|
||||
|
||||
All notable changes of the PHPUnit 4.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [4.1.6] - 2014-08-17
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1380](https://github.com/sebastianbergmann/phpunit/issues/1380): `assertMatch()` returns `Unexpected end tag : hr`
|
||||
* Fixed [#1390](https://github.com/sebastianbergmann/phpunit/issues/1390): Licensing issue with third-party components bundled in PHAR distribution
|
||||
|
||||
## [4.1.5] - 2014-08-07
|
||||
|
||||
### Changed
|
||||
|
||||
* Implemented [#1330](https://github.com/sebastianbergmann/phpunit/issues/1330): Allow non-ambiguous shortened long options
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#529](https://github.com/sebastianbergmann/phpunit/issues/529): Tests missed in execution when another test extends from it
|
||||
* Fixed [#1149](https://github.com/sebastianbergmann/phpunit/issues/1149): Test swallows output buffer when run in a separate process
|
||||
* Fixed [#1336](https://github.com/sebastianbergmann/phpunit/issues/1336): Problem in process isolation with global variables that contain an object which contains a string which contains multiple backslashes
|
||||
* Fixed [#1337](https://github.com/sebastianbergmann/phpunit/issues/1337): Data Provider with `\` at the end of the name breaks with process isolation
|
||||
* Fixed [#1345](https://github.com/sebastianbergmann/phpunit/issues/1345): Process isolation blocks infinitely upon fatal error in child process
|
||||
* Fixed [#1354](https://github.com/sebastianbergmann/phpunit/issues/1354): PHPUnit test suite fails on Windows
|
||||
* Fixed [#1369](https://github.com/sebastianbergmann/phpunit/issues/1369): Performance of `TestSuite::addTestFile()` and missing documentation
|
||||
* Fixed [#1374](https://github.com/sebastianbergmann/phpunit/issues/1374): `tearDown()` is called despite unmet requirements
|
||||
|
||||
## [4.1.4] - 2014-07-18
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1265](https://github.com/sebastianbergmann/phpunit/issues/1265): `PHPUnit_Runner_StandardTestSuiteLoader` could not be configured as loader
|
||||
* Fixed [#1311](https://github.com/sebastianbergmann/phpunit/issues/1311): Incomplete XML Schema for PHPUnit XML configuration file
|
||||
* Fixed [#1314](https://github.com/sebastianbergmann/phpunit/issues/1314): Bug in configuration parser
|
||||
|
||||
## [4.1.3] - 2014-06-11
|
||||
|
||||
New release of PHPUnit as PHP Archive (PHAR) with updated dependencies
|
||||
|
||||
## [4.1.2] - 2014-06-07
|
||||
|
||||
New release of PHPUnit as PHP Archive (PHAR) with updated dependencies
|
||||
|
||||
## [4.1.1] - 2014-05-24
|
||||
|
||||
### Added
|
||||
|
||||
* Added `--selfupdate` alias for `--self-update`
|
||||
|
||||
### Changed
|
||||
|
||||
* Improved the fix for [#1133](https://github.com/sebastianbergmann/phpunit/issues/1133)
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed the constructor argument for `SebastianBergmann\Version`
|
||||
|
||||
## [4.1.0] - 2014-05-02
|
||||
|
||||
### Changed
|
||||
|
||||
* The code to compare PHP values for equality (in `assertEquals()`, for instance) has been factored out into a [separate component](https://github.com/sebastianbergmann/comparator)
|
||||
* [The mock object generator is now created lazily](https://github.com/sebastianbergmann/phpunit/pull/1165)
|
||||
|
||||
[4.1.6]: https://github.com/sebastianbergmann/phpunit/compare/4.1.5...4.1.6
|
||||
[4.1.5]: https://github.com/sebastianbergmann/phpunit/compare/4.1.4...4.1.5
|
||||
[4.1.4]: https://github.com/sebastianbergmann/phpunit/compare/4.1.3...4.1.4
|
||||
[4.1.3]: https://github.com/sebastianbergmann/phpunit/compare/4.1.2...4.1.3
|
||||
[4.1.2]: https://github.com/sebastianbergmann/phpunit/compare/4.1.1...4.1.2
|
||||
[4.1.1]: https://github.com/sebastianbergmann/phpunit/compare/4.1.0...4.1.1
|
||||
[4.1.0]: https://github.com/sebastianbergmann/phpunit/compare/4.0...4.1.0
|
||||
|
||||
56
vendor/phpunit/phpunit/ChangeLog-4.2.md
vendored
56
vendor/phpunit/phpunit/ChangeLog-4.2.md
vendored
@@ -1,56 +0,0 @@
|
||||
# Changes in PHPUnit 4.2
|
||||
|
||||
All notable changes of the PHPUnit 4.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [4.2.5] - 2014-09-06
|
||||
|
||||
New release of PHPUnit as PHP Archive (PHAR) with updated dependencies
|
||||
|
||||
## [4.2.4] - 2014-08-31
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1413](https://github.com/sebastianbergmann/phpunit/issues/1413): `assertCount()` hangs in infinite loop on HHVM
|
||||
|
||||
## [4.2.3] - 2014-08-28
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1403](https://github.com/sebastianbergmann/phpunit/issues/1403): `phpunit --self-update` does not work
|
||||
|
||||
## [4.2.2] - 2014-08-18
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1399](https://github.com/sebastianbergmann/phpunit/issues/1399): `enforceTimeLimit` configuration option is not handled
|
||||
|
||||
## [4.2.1] - 2014-08-17
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1380](https://github.com/sebastianbergmann/phpunit/issues/1380): `assertMatch()` returns `Unexpected end tag : hr`
|
||||
* Fixed [#1390](https://github.com/sebastianbergmann/phpunit/issues/1390): Licensing issue with third-party components bundled in PHAR distribution
|
||||
|
||||
## [4.2.0] - 2014-08-08
|
||||
|
||||
### Added
|
||||
|
||||
* Tests annotated with `@todo` will now be reported as risky when the `--disallow-todo-tests` option is used or `beStrictAboutTodoAnnotatedTests=true` is set in the configuration file
|
||||
* The `atLeast()` and `atMost()` invocation count matchers were added
|
||||
|
||||
### Changed
|
||||
|
||||
* `trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);` is used now to indicate that a PHPUnit API method is deprecated; the old "system" for deprecating methods has been removed
|
||||
* The PHP Archive (PHAR) distribution of PHPUnit can now be used as a library; `include()`ing or `require()`ing it will not execute the CLI test runner
|
||||
|
||||
### Deprecated
|
||||
|
||||
* The `assertTag()` and `assertSelect*()` assertion methods have been deprecated in favor of the [phpunit-dom-assertions](https://github.com/phpunit/phpunit-dom-assertions) extension; these methods will be removed in PHPUnit 5.0
|
||||
|
||||
[4.2.5]: https://github.com/sebastianbergmann/phpunit/compare/4.2.4...4.2.5
|
||||
[4.2.4]: https://github.com/sebastianbergmann/phpunit/compare/4.2.3...4.2.4
|
||||
[4.2.3]: https://github.com/sebastianbergmann/phpunit/compare/4.2.2...4.2.3
|
||||
[4.2.2]: https://github.com/sebastianbergmann/phpunit/compare/4.2.1...4.2.2
|
||||
[4.2.1]: https://github.com/sebastianbergmann/phpunit/compare/4.2.0...4.2.1
|
||||
[4.2.0]: https://github.com/sebastianbergmann/phpunit/compare/4.1...4.2.0
|
||||
|
||||
54
vendor/phpunit/phpunit/ChangeLog-4.3.md
vendored
54
vendor/phpunit/phpunit/ChangeLog-4.3.md
vendored
@@ -1,54 +0,0 @@
|
||||
# Changes in PHPUnit 4.3
|
||||
|
||||
All notable changes of the PHPUnit 4.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [4.3.5] - 2014-11-11
|
||||
|
||||
### Changed
|
||||
|
||||
* Merged [#1484](https://github.com/sebastianbergmann/phpunit/issues/1484): Removed `lazymap` from blacklist as it is not longer used
|
||||
* Merged [#1489](https://github.com/sebastianbergmann/phpunit/issues/1489): Do not send output from tests in process isolation when testing output
|
||||
|
||||
## [4.3.4] - 2014-10-22
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1428](https://github.com/sebastianbergmann/phpunit/issues/1428): Issue with Composer dependencies
|
||||
* Fixed [#1447](https://github.com/sebastianbergmann/phpunit/issues/1447): PHPT tests treat line endings inconsistently
|
||||
|
||||
## [4.3.3] - 2014-10-16
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1471](https://github.com/sebastianbergmann/phpunit/issues/1471): Output made while test is running is printed although `expectOutputString()` is used when an assertion fails
|
||||
|
||||
## [4.3.2] - 2014-10-16
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1468](https://github.com/sebastianbergmann/phpunit/issues/1468): Incomplete and `@todo` annotated tests are counted twice
|
||||
|
||||
## [4.3.1] - 2014-10-06
|
||||
|
||||
New release of PHPUnit as PHP Archive (PHAR) with updated dependencies
|
||||
|
||||
## [4.3.0] - 2014-10-03
|
||||
|
||||
### Added
|
||||
|
||||
* Merged [#1358](https://github.com/sebastianbergmann/phpunit/issues/1358): Implement `@expectedExceptionMessageRegExp` annotation
|
||||
* Merged [#1360](https://github.com/sebastianbergmann/phpunit/issues/1360): Allow a test to identify whether it runs in isolation
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1216](https://github.com/sebastianbergmann/phpunit/issues/1216): Bootstrap does not have global variables set when `--bootstrap` is specified on commandline
|
||||
* Fixed [#1351](https://github.com/sebastianbergmann/phpunit/issues/1351): `TestResult` object contains serialized test class upon test failure/exception in process isolation
|
||||
* Fixed [#1437](https://github.com/sebastianbergmann/phpunit/issues/1437): Risky test messages mask failures
|
||||
|
||||
[4.3.5]: https://github.com/sebastianbergmann/phpunit/compare/4.3.4...4.3.5
|
||||
[4.3.4]: https://github.com/sebastianbergmann/phpunit/compare/4.3.3...4.3.4
|
||||
[4.3.3]: https://github.com/sebastianbergmann/phpunit/compare/4.3.2...4.3.3
|
||||
[4.3.2]: https://github.com/sebastianbergmann/phpunit/compare/4.3.1...4.3.2
|
||||
[4.3.1]: https://github.com/sebastianbergmann/phpunit/compare/4.3.0...4.3.1
|
||||
[4.3.0]: https://github.com/sebastianbergmann/phpunit/compare/4.2...4.3.0
|
||||
|
||||
57
vendor/phpunit/phpunit/ChangeLog-4.4.md
vendored
57
vendor/phpunit/phpunit/ChangeLog-4.4.md
vendored
@@ -1,57 +0,0 @@
|
||||
# Changes in PHPUnit 4.4
|
||||
|
||||
All notable changes of the PHPUnit 4.4 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [4.4.5] - 2015-01-27
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1592](https://github.com/sebastianbergmann/phpunit/issues/1592): Incorrect dependency information
|
||||
|
||||
## [4.4.4] - 2015-01-24
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1587](https://github.com/sebastianbergmann/phpunit/issues/1587): Class `SebastianBergmann\Exporter\Context` not found
|
||||
|
||||
## [4.4.3] - 2015-01-24
|
||||
|
||||
New PHAR release due to updated dependencies
|
||||
|
||||
## [4.4.2] - 2015-01-17
|
||||
|
||||
### Changed
|
||||
|
||||
* Merged [#1573](https://github.com/sebastianbergmann/phpunit/issues/1573): Updates for the XSD for PHPUnit XML configuration
|
||||
|
||||
### Fixed
|
||||
|
||||
* Merged [#1567](https://github.com/sebastianbergmann/phpunit/issues/1567): `coverage-crap4j` missing in XSD for PHPUnit XML configuration
|
||||
* Fixed [#1570](https://github.com/sebastianbergmann/phpunit/issues/1570): Test that prints output is marked as failure and not as risky when `--disallow-test-output` is used
|
||||
* Fixed `--stderr` with `--tap` or `--testdox` options
|
||||
|
||||
## [4.4.1] - 2014-12-28
|
||||
|
||||
### Changed
|
||||
|
||||
* Merged [#1528](https://github.com/sebastianbergmann/phpunit/issues/1528): Add `expectedCount()` to `toString()` return value
|
||||
|
||||
## [4.4.0] - 2014-12-05
|
||||
|
||||
### Added
|
||||
|
||||
* Merged [#1371](https://github.com/sebastianbergmann/phpunit/issues/1371): Implement `assertArraySubset()` assertion
|
||||
* Merged [#1439](https://github.com/sebastianbergmann/phpunit/issues/1439): Add support for `double` to `assertInternalType()`
|
||||
|
||||
### Changed
|
||||
|
||||
* Merged [#1427](https://github.com/sebastianbergmann/phpunit/issues/1427): Improve failure output for tests when provided data is binary
|
||||
* Merged [#1458](https://github.com/sebastianbergmann/phpunit/issues/1458): Only enable colors when PHPUnit is run on a console (and output is not sent to a file)
|
||||
|
||||
[4.4.5]: https://github.com/sebastianbergmann/phpunit/compare/4.4.4...4.4.5
|
||||
[4.4.4]: https://github.com/sebastianbergmann/phpunit/compare/4.4.3...4.4.4
|
||||
[4.4.3]: https://github.com/sebastianbergmann/phpunit/compare/4.4.2...4.4.3
|
||||
[4.4.2]: https://github.com/sebastianbergmann/phpunit/compare/4.4.1...4.4.2
|
||||
[4.4.1]: https://github.com/sebastianbergmann/phpunit/compare/4.4.0...4.4.1
|
||||
[4.4.0]: https://github.com/sebastianbergmann/phpunit/compare/4.3...4.4.0
|
||||
|
||||
28
vendor/phpunit/phpunit/ChangeLog-4.5.md
vendored
28
vendor/phpunit/phpunit/ChangeLog-4.5.md
vendored
@@ -1,28 +0,0 @@
|
||||
# Changes in PHPUnit 4.5
|
||||
|
||||
All notable changes of the PHPUnit 4.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [4.5.1] - 2015-03-29
|
||||
|
||||
## [4.5.0] - 2015-02-05
|
||||
|
||||
### Added
|
||||
|
||||
* Added out-of-the-box support for [Prophecy](https://github.com/phpspec/prophecy)
|
||||
* Implemented [#137](https://github.com/sebastianbergmann/phpunit/issues/137): Add support for variable number of tests shown per line in default result printer
|
||||
|
||||
### Changed
|
||||
|
||||
* Merged [#1478](https://github.com/sebastianbergmann/phpunit/issues/1478): Improve the performance of `PHPUnit_Framework_Constraint_IsEqual` (which is used by `assertEquals()`, for instance) for the most common case
|
||||
|
||||
### Deprecated
|
||||
|
||||
* [Deprecated](https://github.com/sebastianbergmann/phpunit/commit/7abe7796f77b13fdf3cfc506fb987d6c2ab477f5) the `--strict` commandline option and the XML configuration's `strict` attribute
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1474](https://github.com/sebastianbergmann/phpunit/issues/1474): Allow the registration of custom comparators for `assertEquals()` et al. (again)
|
||||
|
||||
[4.5.1]: https://github.com/sebastianbergmann/phpunit/compare/4.5.0...4.5.1
|
||||
[4.5.0]: https://github.com/sebastianbergmann/phpunit/compare/4.4...4.5.0
|
||||
|
||||
95
vendor/phpunit/phpunit/ChangeLog-4.6.md
vendored
95
vendor/phpunit/phpunit/ChangeLog-4.6.md
vendored
@@ -1,95 +0,0 @@
|
||||
# Changes in PHPUnit 4.6
|
||||
|
||||
All notable changes of the PHPUnit 4.6 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [4.6.10] - 2015-06-03
|
||||
|
||||
### Changed
|
||||
|
||||
* Merged [#1693](https://github.com/sebastianbergmann/phpunit/pull/1693): Improved API documentation
|
||||
* Merged [#1706](https://github.com/sebastianbergmann/phpunit/pull/1706): Avoid hard-coded URI to `phpunit.xsd`
|
||||
* Merged [#1725](https://github.com/sebastianbergmann/phpunit/pull/1725): Update phpDox XSD URI
|
||||
* Merged [#1735](https://github.com/sebastianbergmann/phpunit/pull/1735): Mute `chdir()` failures in XInclude handling of XML configuration file
|
||||
* Merged [#1736](https://github.com/sebastianbergmann/phpunit/pull/1736): Verify that phar file can be overwritten before attempting self update
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1737](https://github.com/sebastianbergmann/phpunit/issues/1737): Confusing output from `--testdox` for empty test class
|
||||
|
||||
## [4.6.9] - 2015-05-29
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1731](https://github.com/sebastianbergmann/phpunit/issues/1731): `.` after failure count has no background color when `--colors` is used
|
||||
|
||||
## [4.6.8] - 2015-05-28
|
||||
|
||||
New PHAR release due to updated dependencies
|
||||
|
||||
## [4.6.7] - 2015-05-25
|
||||
|
||||
New PHAR release due to updated dependencies
|
||||
|
||||
## [4.6.6] - 2015-04-29
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1684](https://github.com/sebastianbergmann/phpunit/issues/1684): PHAR does not work on HHVM
|
||||
|
||||
## [4.6.5] - 2015-04-29
|
||||
|
||||
* Fixed [#1677](https://github.com/sebastianbergmann/phpunit/issues/1677): Number of risky tests not printed when there are failing tests
|
||||
* Fixed [#1688](https://github.com/sebastianbergmann/phpunit/issues/1688): Self-Update operation does not work due to outdated SSL certificate
|
||||
|
||||
## [4.6.4] - 2015-04-11
|
||||
|
||||
### Changed
|
||||
|
||||
* The default list of blacklisted classes is now always passed to PHP_CodeCoverage
|
||||
|
||||
## [4.6.3] - 2015-04-11
|
||||
|
||||
### Changed
|
||||
|
||||
* Updated the default list of blacklisted classes
|
||||
|
||||
## [4.6.2] - 2015-04-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1667](https://github.com/sebastianbergmann/phpunit/issues/1667): Loading `src/Framework/Assert/Functions.php` by default causes collisions
|
||||
|
||||
## [4.6.1] - 2015-04-03
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1665](https://github.com/sebastianbergmann/phpunit/issues/1665): PHPUnit 4.6.0 PHAR does not work when renamed to `phpunit`
|
||||
|
||||
## [4.6.0] - 2015-04-03
|
||||
|
||||
### Added
|
||||
|
||||
* Added the `--strict-global-state` command-line option and the `beStrictAboutChangesToGlobalState` configuration setting for enabling a check that global variabes, super-global variables, and static attributes in user-defined classes are not modified during a test
|
||||
* Merged [#1527](https://github.com/sebastianbergmann/phpunit/issues/1527) and [#1529](https://github.com/sebastianbergmann/phpunit/issues/1529): Allow to define options for displaying colors
|
||||
|
||||
### Changed
|
||||
|
||||
* Merged [#1528](https://github.com/sebastianbergmann/phpunit/issues/1528): Improve message when `PHPUnit_Framework_Constraint_Count` is used with logical operators
|
||||
|
||||
### Fixed
|
||||
|
||||
* Merged [#1537](https://github.com/sebastianbergmann/phpunit/issues/1537): Fix problem of `--stderr` with `--tap` and `--testdox`
|
||||
* Fixed [#1599](https://github.com/sebastianbergmann/phpunit/issues/1599): The PHAR build of PHPUnit no longer uses an autoloader to load PHPUnit's own classes and instead statically loads all classes on startup
|
||||
|
||||
[4.6.10]: https://github.com/sebastianbergmann/phpunit/compare/4.6.9...4.6.10
|
||||
[4.6.9]: https://github.com/sebastianbergmann/phpunit/compare/4.6.8...4.6.9
|
||||
[4.6.8]: https://github.com/sebastianbergmann/phpunit/compare/4.6.7...4.6.8
|
||||
[4.6.7]: https://github.com/sebastianbergmann/phpunit/compare/4.6.6...4.6.7
|
||||
[4.6.6]: https://github.com/sebastianbergmann/phpunit/compare/4.6.5...4.6.6
|
||||
[4.6.5]: https://github.com/sebastianbergmann/phpunit/compare/4.6.4...4.6.5
|
||||
[4.6.4]: https://github.com/sebastianbergmann/phpunit/compare/4.6.3...4.6.4
|
||||
[4.6.3]: https://github.com/sebastianbergmann/phpunit/compare/4.6.2...4.6.3
|
||||
[4.6.2]: https://github.com/sebastianbergmann/phpunit/compare/4.6.1...4.6.2
|
||||
[4.6.1]: https://github.com/sebastianbergmann/phpunit/compare/4.6.0...4.6.1
|
||||
[4.6.0]: https://github.com/sebastianbergmann/phpunit/compare/4.5...4.6.0
|
||||
|
||||
71
vendor/phpunit/phpunit/ChangeLog-4.7.md
vendored
71
vendor/phpunit/phpunit/ChangeLog-4.7.md
vendored
@@ -1,71 +0,0 @@
|
||||
# Changes in PHPUnit 4.7
|
||||
|
||||
All notable changes of the PHPUnit 4.7 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [4.7.7] - 2015-07-13
|
||||
|
||||
New PHAR release due to updated dependencies
|
||||
|
||||
## [4.7.6] - 2015-06-30
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1681](https://github.com/sebastianbergmann/phpunit/issues/1681): Code Coverage filter configuration is not passed to child processes
|
||||
* Fixed [#1692](https://github.com/sebastianbergmann/phpunit/issues/1692): Clean up `PHPUnit_Extensions_RepeatedTest` after refactoring
|
||||
* Fixed [#1763](https://github.com/sebastianbergmann/phpunit/issues/1763): `@before` and `@after` annotations do not work when inherited
|
||||
|
||||
## [4.7.5] - 2015-06-21
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#490](https://github.com/sebastianbergmann/phpunit/issues/490): Ensure that a test can only be one of `@small`, `@medium`, or `@large`.
|
||||
* Fixed [#1704](https://github.com/sebastianbergmann/phpunit/issues/1704): Output printed during test missing when using TAP
|
||||
|
||||
## [4.7.4] - 2015-06-18
|
||||
|
||||
### Changed
|
||||
|
||||
* The `PHPUnit_Framework_Constraint_IsType` constraint now knows about the `real` type (which is an alias for `float`)
|
||||
* Various work on compatibility with PHP 7
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1749](https://github.com/sebastianbergmann/phpunit/issues/1749): `stopOnError` configuration setting does not work
|
||||
|
||||
## [4.7.3] - 2015-06-11
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1317](https://github.com/sebastianbergmann/phpunit/issues/1317): JUnit XML logfiles does not contain warnings
|
||||
* Fixed an [issue](https://github.com/sebastianbergmann/php-code-coverage/issues/347) where the warning that no whitelist is used is displayed when it should not
|
||||
|
||||
## [4.7.2] - 2015-06-06
|
||||
|
||||
New PHAR release due to updated dependencies
|
||||
|
||||
## [4.7.1] - 2015-06-05
|
||||
|
||||
New PHAR release due to updated dependencies
|
||||
|
||||
## [4.7.0] - 2015-06-05
|
||||
|
||||
### Added
|
||||
|
||||
* Merged [#1718](https://github.com/sebastianbergmann/phpunit/issues/1718): Support for `--INI--` section in PHPT tests
|
||||
|
||||
### Changed
|
||||
|
||||
* Tests not annotated with `@small`, `@medium`, or `@large` are no longer treated as being annotated with `@small`
|
||||
* In verbose mode, the test runner now prints information about the PHP runtime
|
||||
* To be consistent with the printing of PHP runtime information, the configuration file used is only printed in verbose mode
|
||||
* A warning is now printed when code coverage data is collected but no whitelist is configured
|
||||
|
||||
[4.7.7]: https://github.com/sebastianbergmann/phpunit/compare/4.7.6...4.7.7
|
||||
[4.7.6]: https://github.com/sebastianbergmann/phpunit/compare/4.7.5...4.7.6
|
||||
[4.7.5]: https://github.com/sebastianbergmann/phpunit/compare/4.7.4...4.7.5
|
||||
[4.7.4]: https://github.com/sebastianbergmann/phpunit/compare/4.7.3...4.7.4
|
||||
[4.7.3]: https://github.com/sebastianbergmann/phpunit/compare/4.7.2...4.7.3
|
||||
[4.7.2]: https://github.com/sebastianbergmann/phpunit/compare/4.7.1...4.7.2
|
||||
[4.7.1]: https://github.com/sebastianbergmann/phpunit/compare/4.7.0...4.7.1
|
||||
[4.7.0]: https://github.com/sebastianbergmann/phpunit/compare/4.6...4.7.0
|
||||
|
||||
293
vendor/phpunit/phpunit/ChangeLog-4.8.md
vendored
293
vendor/phpunit/phpunit/ChangeLog-4.8.md
vendored
@@ -1,293 +0,0 @@
|
||||
# Changes in PHPUnit 4.8
|
||||
|
||||
All notable changes of the PHPUnit 4.8 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [4.8.36] - 2017-06-21
|
||||
|
||||
### Added
|
||||
|
||||
* Added `PHPUnit\Framework\AssertionFailedError`, `PHPUnit\Framework\Test`, and `PHPUnit\Framework\TestSuite` to the forward compatibility layer for PHPUnit 6
|
||||
|
||||
## [4.8.35] - 2017-02-06
|
||||
|
||||
### Added
|
||||
|
||||
* Backported the forward compatibility layer for PHPUnit 6 from PHPUnit 5 so that `PHPUnit\Framework\TestCase` can be used instead of `PHPUnit_Framework_TestCase`
|
||||
|
||||
## [4.8.34] - 2017-01-26
|
||||
|
||||
* Fixed [#2447](https://github.com/sebastianbergmann/phpunit/issues/2447): Reverted backwards incompatible change to handling of boolean environment variable values specified in XML
|
||||
|
||||
## [4.8.33] - 2017-01-25
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1983](https://github.com/sebastianbergmann/phpunit/pull/1983): Tests with `@expectedException` annotation cannot be skipped
|
||||
* Fixed [#2275](https://github.com/sebastianbergmann/phpunit/pull/2275): Invalid UTF-8 characters can lead to missing output
|
||||
* Fixed [#2331](https://github.com/sebastianbergmann/phpunit/issues/2331): Boolean environment variable values specified in XML get mangled
|
||||
* 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`
|
||||
|
||||
## [4.8.32] - 2017-01-22
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2428](https://github.com/sebastianbergmann/phpunit/pull/2428): Nested arrays specificied in XML configuration file are not handled correctly
|
||||
|
||||
## [4.8.31] - 2016-12-09
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2384](https://github.com/sebastianbergmann/phpunit/pull/2384): Handle `PHPUnit_Framework_Exception` correctly when expecting exceptions
|
||||
|
||||
## [4.8.30] - 2016-12-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2367](https://github.com/sebastianbergmann/phpunit/pull/2367): Bug in `PHPUnit_Util_Test::parseAnnotationContent()`
|
||||
* Fixed [#2375](https://github.com/sebastianbergmann/phpunit/issues/2375): Invalid regular expression for `--filter` causes PHP warning
|
||||
|
||||
## [4.8.29] - 2016-11-20
|
||||
|
||||
### Changed
|
||||
|
||||
* Bumped the required version of `sebastian/comparator`
|
||||
|
||||
## [4.8.28] - 2016-11-14
|
||||
|
||||
### Fixed
|
||||
|
||||
* Improved the fix for [#1955](https://github.com/sebastianbergmann/phpunit/issues/1955): Process isolation fails when running tests with `phpdbg -qrr`
|
||||
|
||||
## [4.8.27] - 2016-07-21
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1968](https://github.com/sebastianbergmann/phpunit/issues/1968): Invalid data sets are not handled correctly for `@testWith` annotation
|
||||
|
||||
## [4.8.26] - 2016-05-17
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [phpunit-mock-objects/#301](https://github.com/sebastianbergmann/phpunit-mock-objects/issues/301): `PHPUnit_Framework_MockObject_MockBuilder::getMock()` calls `PHPUnit_Framework_TestCase::getMock()` with more arguments than accepted
|
||||
|
||||
## [4.8.25] - 2016-05-10
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2112](https://github.com/sebastianbergmann/phpunit/issues/2112): Output is html entity encoded when ran through `phpdbg`
|
||||
* Fixed [#2158](https://github.com/sebastianbergmann/phpunit/issues/2158): Failure to run tests in separate processes if a file included into main process contains constant definition
|
||||
|
||||
## [4.8.24] - 2016-03-14
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1959](https://github.com/sebastianbergmann/phpunit/issues/1959): Prophecy errors are not handled correctly
|
||||
* Fixed [#2039](https://github.com/sebastianbergmann/phpunit/issues/2039): TestDox does not handle snake_case test methods properly
|
||||
* Fixed [#2109](https://github.com/sebastianbergmann/phpunit/issues/2109): Process isolation leaks global variable
|
||||
|
||||
## [4.8.23] - 2016-02-11
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2072](https://github.com/sebastianbergmann/phpunit/issues/2072): Paths in XML configuration file were not handled correctly when they have whitespace around them
|
||||
|
||||
## [4.8.22] - 2016-02-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2050](https://github.com/sebastianbergmann/phpunit/issues/2050): `PHPUnit_Util_XML::load()` raises exception with empty message when XML string is empty
|
||||
* Fixed a bug in `PHPUnit_Runner_Version::series()`
|
||||
|
||||
## [4.8.21] - 2015-12-12
|
||||
|
||||
### Changed
|
||||
|
||||
* Reverted the changes introduced in PHPUnit 4.8.20 as the only thing the new version constraint in `composer.json` achieved was locking PHP 7 users to PHPUnit 4.8.19
|
||||
|
||||
## [4.8.20] - 2015-12-10
|
||||
|
||||
### Changed
|
||||
|
||||
* Changed PHP version constraint in `composer.json` to prevent installing PHPUnit 4.8 on PHP 7
|
||||
* `phpunit.phar` will now refuse to work on PHP 7
|
||||
|
||||
## [4.8.19] - 2015-11-30
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1955](https://github.com/sebastianbergmann/phpunit/issues/1955): Process isolation fails when running tests with `phpdbg -qrr`
|
||||
|
||||
## [4.8.18] - 2015-11-11
|
||||
|
||||
### Changed
|
||||
|
||||
* DbUnit 1.4 is bundled again in the PHAR distribution
|
||||
|
||||
## [4.8.17] - 2015-11-10
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1935](https://github.com/sebastianbergmann/phpunit/issues/1935): `PHP_CodeCoverage_Exception` not handled properly
|
||||
* Fixed [#1948](https://github.com/sebastianbergmann/phpunit/issues/1948): Unable to use PHAR due to unsupported signature error
|
||||
|
||||
### Changed
|
||||
|
||||
* DbUnit >= 2.0.2 is now bundled in the PHAR distribution
|
||||
|
||||
## [4.8.16] - 2015-10-23
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#1925](https://github.com/sebastianbergmann/phpunit/issues/1925): Provide a library-only PHAR
|
||||
|
||||
## [4.8.15] - 2015-10-22
|
||||
|
||||
### Fixed
|
||||
|
||||
* The backup of global state is now properly restored when changes to global state are disallowed
|
||||
* The `__PHPUNIT_PHAR__` constant is now properly set when the PHPUnit PHAR is used as a library
|
||||
|
||||
## [4.8.14] - 2015-10-17
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1892](https://github.com/sebastianbergmann/phpunit/issues/1892): `--coverage-text` does not honor color settings
|
||||
|
||||
## [4.8.13] - 2015-10-14
|
||||
|
||||
### Added
|
||||
|
||||
* Added the `--self-upgrade` commandline switch for upgrading a PHPUnit PHAR to the latest version
|
||||
|
||||
### Changed
|
||||
|
||||
* The `--self-update` commandline switch now updates a PHPUnit PHAR to the latest version within the same release series
|
||||
|
||||
## [4.8.12] - 2015-10-12
|
||||
|
||||
### Changed
|
||||
|
||||
* Merged [#1893](https://github.com/sebastianbergmann/phpunit/issues/1893): Removed workaround for phpab bug
|
||||
|
||||
## [4.8.11] - 2015-10-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Merged [#1885](https://github.com/sebastianbergmann/phpunit/issues/1885): Fixed handling of PHP configuration settings for process isolation
|
||||
* Fixed [#1857](https://github.com/sebastianbergmann/phpunit/issues/1857): `@covers` and `@uses` should only take a single word
|
||||
* Fixed [#1879](https://github.com/sebastianbergmann/phpunit/issues/1879): `assertEqualXMLStructure()` cannot compare nodes with an ID
|
||||
* Fixed [#1898](https://github.com/sebastianbergmann/phpunit/issues/1898): `@covers` and `@uses` cannot be used for namespaced functions
|
||||
* Fixed [#1901](https://github.com/sebastianbergmann/phpunit/issues/1901): `--self-update` updates to PHPUnit 5, even on PHP < 5.6
|
||||
|
||||
## [4.8.10] - 2015-10-01
|
||||
|
||||
### Fixed
|
||||
|
||||
* Merged [#1884](https://github.com/sebastianbergmann/phpunit/issues/1884): Avoid passing `Error` to `onNotSuccessfulTest()` on PHP 7
|
||||
|
||||
## [4.8.9] - 2015-09-20
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed regression introduced in PHPUnit 4.8.8
|
||||
|
||||
## [4.8.8] - 2015-09-19
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1860](https://github.com/sebastianbergmann/phpunit/issues/1860): Not well-formed XML strings are always considered equal by `PHPUnit_Framework_Assert::assertXmlStringEqualsXmlString()`
|
||||
|
||||
## [4.8.7] - 2015-09-14
|
||||
|
||||
New PHAR release due to updated dependencies
|
||||
|
||||
## [4.8.6] - 2015-08-24
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1835](https://github.com/sebastianbergmann/phpunit/issues/1835): Skipped test reported as errored since PHPUnit 4.7.4
|
||||
|
||||
## [4.8.5] - 2015-08-19
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1831](https://github.com/sebastianbergmann/phpunit/issues/1831): PHAR manifest is missing
|
||||
|
||||
## [4.8.4] - 2015-08-15
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1823](https://github.com/sebastianbergmann/phpunit/issues/1823): Columns attribute in XML configuration file is ignored
|
||||
|
||||
## [4.8.3] - 2015-08-10
|
||||
|
||||
### Changed
|
||||
|
||||
* PHPUnit now exits early during bootstrap when an unsupported version of PHP is used
|
||||
|
||||
## [4.8.2] - 2015-08-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1816](https://github.com/sebastianbergmann/phpunit/issues/1816): PHPUnit 4.8.1 shows "4.8.0" as version number
|
||||
|
||||
## [4.8.1] - 2015-08-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1815](https://github.com/sebastianbergmann/phpunit/issues/1815): `phpunit --self-update` does not work in PHPUnit 4.8.0
|
||||
|
||||
## [4.8.0] - 2015-08-07
|
||||
|
||||
### Added
|
||||
|
||||
* Added `--check-version` commandline switch to check whether the current version of PHPUnit is used (PHAR only)
|
||||
* Added `--no-coverage` commandline switch to ignore code coverage configuration from the configuration file
|
||||
* Implemented [#1663](https://github.com/sebastianbergmann/phpunit/issues/1663): The Crap4J report's threshold is now configurable
|
||||
* Merged [#1728](https://github.com/sebastianbergmann/phpunit/issues/1728): Implemented the `@testWith` annotation as "syntactic sugar" for data providers
|
||||
* Merged [#1739](https://github.com/sebastianbergmann/phpunit/issues/1739): Added support to the commandline test runner for using options after arguments
|
||||
|
||||
### Changed
|
||||
|
||||
* Made the argument check of `assertContains()` and `assertNotContains()` more strict to prevent undefined behavior such as [#1808](https://github.com/sebastianbergmann/phpunit/issues/1808)
|
||||
* Changed the name of the default group from `__nogroup__` to `default`
|
||||
|
||||
[4.8.36]: https://github.com/sebastianbergmann/phpunit/compare/4.8.35...4.8.36
|
||||
[4.8.35]: https://github.com/sebastianbergmann/phpunit/compare/4.8.34...4.8.35
|
||||
[4.8.34]: https://github.com/sebastianbergmann/phpunit/compare/4.8.33...4.8.34
|
||||
[4.8.33]: https://github.com/sebastianbergmann/phpunit/compare/4.8.32...4.8.33
|
||||
[4.8.32]: https://github.com/sebastianbergmann/phpunit/compare/4.8.31...4.8.32
|
||||
[4.8.31]: https://github.com/sebastianbergmann/phpunit/compare/4.8.30...4.8.31
|
||||
[4.8.30]: https://github.com/sebastianbergmann/phpunit/compare/4.8.29...4.8.30
|
||||
[4.8.29]: https://github.com/sebastianbergmann/phpunit/compare/4.8.28...4.8.29
|
||||
[4.8.28]: https://github.com/sebastianbergmann/phpunit/compare/4.8.27...4.8.28
|
||||
[4.8.27]: https://github.com/sebastianbergmann/phpunit/compare/4.8.26...4.8.27
|
||||
[4.8.26]: https://github.com/sebastianbergmann/phpunit/compare/4.8.25...4.8.26
|
||||
[4.8.25]: https://github.com/sebastianbergmann/phpunit/compare/4.8.24...4.8.25
|
||||
[4.8.24]: https://github.com/sebastianbergmann/phpunit/compare/4.8.23...4.8.24
|
||||
[4.8.23]: https://github.com/sebastianbergmann/phpunit/compare/4.8.22...4.8.23
|
||||
[4.8.22]: https://github.com/sebastianbergmann/phpunit/compare/4.8.21...4.8.22
|
||||
[4.8.21]: https://github.com/sebastianbergmann/phpunit/compare/4.8.20...4.8.21
|
||||
[4.8.20]: https://github.com/sebastianbergmann/phpunit/compare/4.8.19...4.8.20
|
||||
[4.8.19]: https://github.com/sebastianbergmann/phpunit/compare/4.8.18...4.8.19
|
||||
[4.8.18]: https://github.com/sebastianbergmann/phpunit/compare/4.8.17...4.8.18
|
||||
[4.8.17]: https://github.com/sebastianbergmann/phpunit/compare/4.8.16...4.8.17
|
||||
[4.8.16]: https://github.com/sebastianbergmann/phpunit/compare/4.8.15...4.8.16
|
||||
[4.8.15]: https://github.com/sebastianbergmann/phpunit/compare/4.8.14...4.8.15
|
||||
[4.8.14]: https://github.com/sebastianbergmann/phpunit/compare/4.8.13...4.8.14
|
||||
[4.8.13]: https://github.com/sebastianbergmann/phpunit/compare/4.8.12...4.8.13
|
||||
[4.8.12]: https://github.com/sebastianbergmann/phpunit/compare/4.8.11...4.8.12
|
||||
[4.8.11]: https://github.com/sebastianbergmann/phpunit/compare/4.8.10...4.8.11
|
||||
[4.8.10]: https://github.com/sebastianbergmann/phpunit/compare/4.8.9...4.8.10
|
||||
[4.8.9]: https://github.com/sebastianbergmann/phpunit/compare/4.8.8...4.8.9
|
||||
[4.8.8]: https://github.com/sebastianbergmann/phpunit/compare/4.8.7...4.8.8
|
||||
[4.8.7]: https://github.com/sebastianbergmann/phpunit/compare/4.8.6...4.8.7
|
||||
[4.8.6]: https://github.com/sebastianbergmann/phpunit/compare/4.8.5...4.8.6
|
||||
[4.8.5]: https://github.com/sebastianbergmann/phpunit/compare/4.8.4...4.8.5
|
||||
[4.8.4]: https://github.com/sebastianbergmann/phpunit/compare/4.8.3...4.8.4
|
||||
[4.8.3]: https://github.com/sebastianbergmann/phpunit/compare/4.8.2...4.8.3
|
||||
[4.8.2]: https://github.com/sebastianbergmann/phpunit/compare/4.8.1...4.8.2
|
||||
[4.8.1]: https://github.com/sebastianbergmann/phpunit/compare/4.8.0...4.8.1
|
||||
[4.8.0]: https://github.com/sebastianbergmann/phpunit/compare/4.7...4.8.0
|
||||
|
||||
128
vendor/phpunit/phpunit/ChangeLog-5.0.md
vendored
128
vendor/phpunit/phpunit/ChangeLog-5.0.md
vendored
@@ -1,128 +0,0 @@
|
||||
# Changes in PHPUnit 5.0
|
||||
|
||||
All notable changes of the PHPUnit 5.0 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [5.0.10] - 2015-11-30
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1953](https://github.com/sebastianbergmann/phpunit/issues/1953): `Error`s raised outside the scope of a test method are not handled properly
|
||||
* Fixed [#1955](https://github.com/sebastianbergmann/phpunit/issues/1955): Process isolation fails when running tests with `phpdbg -qrr`
|
||||
|
||||
## [5.0.9] - 2015-11-10
|
||||
|
||||
### Added
|
||||
|
||||
* Merged [#1909](https://github.com/sebastianbergmann/phpunit/issues/1909): Added `flowId` parameter to each TeamCity message (for parallel tests)
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1935](https://github.com/sebastianbergmann/phpunit/issues/1935): `PHP_CodeCoverage_Exception` not handled properly
|
||||
* Fixed [#1944](https://github.com/sebastianbergmann/phpunit/issues/1944): Exceptions are not handled correctly on PHP 7 when an exception is expected
|
||||
* Fixed [#1948](https://github.com/sebastianbergmann/phpunit/issues/1948): Unable to use PHAR due to unsupported signature error
|
||||
|
||||
### Removed
|
||||
|
||||
* Removed leftover references to PHPUnit_Selenium
|
||||
|
||||
## [5.0.8] - 2015-10-23
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#1925](https://github.com/sebastianbergmann/phpunit/issues/1925): Provide a library-only PHAR
|
||||
|
||||
## [5.0.7] - 2015-10-22
|
||||
|
||||
### Fixed
|
||||
|
||||
* The backup of global state is now properly restored when changes to global state are disallowed
|
||||
* The `__PHPUNIT_PHAR__` constant is now properly set when the PHPUnit PHAR is used as a library
|
||||
|
||||
## [5.0.6] - 2015-10-14
|
||||
|
||||
### Added
|
||||
|
||||
* Added the `--self-upgrade` commandline switch for upgrading a PHPUnit PHAR to the latest version
|
||||
|
||||
### Changed
|
||||
|
||||
* The `--self-update` commandline switch now updates a PHPUnit PHAR to the latest version within the same release series
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1892](https://github.com/sebastianbergmann/phpunit/issues/1892): `--coverage-text` does not honor color settings
|
||||
|
||||
## [5.0.5] - 2015-10-12
|
||||
|
||||
### Changed
|
||||
|
||||
* Merged [#1893](https://github.com/sebastianbergmann/phpunit/issues/1893): Removed workaround for phpab bug
|
||||
|
||||
## [5.0.4] - 2015-10-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1857](https://github.com/sebastianbergmann/phpunit/issues/1857): `@covers` and `@uses` should only take a single word
|
||||
* Fixed [#1898](https://github.com/sebastianbergmann/phpunit/issues/1898): `@covers` and `@uses` cannot be used for namespaced functions
|
||||
|
||||
## [5.0.3] - 2015-10-02
|
||||
|
||||
* Fixed check for PHP version in PHAR distribution of PHPUnit
|
||||
|
||||
## [5.0.2] - 2015-10-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1879](https://github.com/sebastianbergmann/phpunit/issues/1879): `assertEqualXMLStructure()` cannot compare nodes with an ID
|
||||
* Fixed [#1887](https://github.com/sebastianbergmann/phpunit/issues/1887): PHAR distribution of PHPUnit 5.0.1 does not work
|
||||
|
||||
## [5.0.1] - 2015-10-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Merged [#1885](https://github.com/sebastianbergmann/phpunit/issues/1885): Fixed handling of PHP configuration settings for process isolation
|
||||
* An outdated version of DbUnit was bundled in the PHAR distribution of PHPUnit
|
||||
|
||||
## [5.0.0] - 2015-10-02
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#1604](https://github.com/sebastianbergmann/phpunit/issues/1604): A `@small` test should be marked as risky when it executes code that performs I/O operations
|
||||
* Implemented [#1656](https://github.com/sebastianbergmann/phpunit/issues/1656): Allow sorting test failures in reverse
|
||||
* Merged [#1753](https://github.com/sebastianbergmann/phpunit/issues/1753): Added the `assertFinite()`, `assertInfinite()` and `assertNan()` assertions
|
||||
* Merged [#1876](https://github.com/sebastianbergmann/phpunit/issues/1876): Added the `--atleast-version` commandline option
|
||||
* Implemented [#1780](https://github.com/sebastianbergmann/phpunit/issues/1780): Support for deep-cloning of results passed between tests using `@depends`
|
||||
* Implemented [#1821](https://github.com/sebastianbergmann/phpunit/issues/1821): Expectations on mock objects passed via `@depends` are now also evaluated for the depending test
|
||||
* Added `--whitelist` commandline option to configure a whitelist for code coverage analysis
|
||||
* Added convenience wrapper `getMockWithoutInvokingTheOriginalConstructor()` to create a test double without invoking the original class' constructor
|
||||
* Added TeamCity test result logger for more seamless integration of PHPUnit with PhpStorm
|
||||
|
||||
### Changed
|
||||
|
||||
* Merged [#1781](https://github.com/sebastianbergmann/phpunit/issues/1781): Empty string is not treated as a valid JSON string anymore
|
||||
* Merged [#1822](https://github.com/sebastianbergmann/phpunit/issues/1822): Always output progress totals on last line
|
||||
* It is now mandatory to configure a whitelist for code coverage analysis
|
||||
* Renamed the `beStrictAboutTestSize` configuration option to `enforceTimeLimit`
|
||||
* Printer-related CLI options now override printer-related configuration settings
|
||||
|
||||
### Removed
|
||||
|
||||
* The `assertSelectCount()`, `assertSelectRegExp()`, `assertSelectEquals()`, `assertTag()`, `assertNotTag()` assertions have been removed
|
||||
* The `--strict` commandline option and the XML configuration's `strict` attribute have been removed
|
||||
* The code coverage blacklist functionality has been removed
|
||||
* The PHPUnit_Selenium component is no longer bundled in the PHAR distribution
|
||||
* The PHPUnit_Selenium component can no longer be configured using the `<selenium/browser>` element of PHPUnit's configuration file
|
||||
* PHPUnit is no longer supported on PHP 5.3, PHP 5.4, and PHP 5.5
|
||||
|
||||
[5.0.10]: https://github.com/sebastianbergmann/phpunit/compare/5.0.9...5.0.10
|
||||
[5.0.9]: https://github.com/sebastianbergmann/phpunit/compare/5.0.8...5.0.9
|
||||
[5.0.8]: https://github.com/sebastianbergmann/phpunit/compare/5.0.7...5.0.8
|
||||
[5.0.7]: https://github.com/sebastianbergmann/phpunit/compare/5.0.6...5.0.7
|
||||
[5.0.6]: https://github.com/sebastianbergmann/phpunit/compare/5.0.5...5.0.6
|
||||
[5.0.5]: https://github.com/sebastianbergmann/phpunit/compare/5.0.4...5.0.5
|
||||
[5.0.4]: https://github.com/sebastianbergmann/phpunit/compare/5.0.3...5.0.4
|
||||
[5.0.3]: https://github.com/sebastianbergmann/phpunit/compare/5.0.2...5.0.3
|
||||
[5.0.2]: https://github.com/sebastianbergmann/phpunit/compare/5.0.1...5.0.2
|
||||
[5.0.1]: https://github.com/sebastianbergmann/phpunit/compare/5.0.0...5.0.1
|
||||
[5.0.0]: https://github.com/sebastianbergmann/phpunit/compare/4.8...5.0.0
|
||||
|
||||
68
vendor/phpunit/phpunit/ChangeLog-5.1.md
vendored
68
vendor/phpunit/phpunit/ChangeLog-5.1.md
vendored
@@ -1,68 +0,0 @@
|
||||
# Changes in PHPUnit 5.1
|
||||
|
||||
All notable changes of the PHPUnit 5.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [5.1.7] - 2016-02-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2050](https://github.com/sebastianbergmann/phpunit/issues/2050): `PHPUnit_Util_XML::load()` raises exception with empty message when XML string is empty
|
||||
|
||||
## [5.1.6] - 2016-01-29
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2052](https://github.com/sebastianbergmann/phpunit/issues/2052): PHPUnit 5.1.5 breaks coverage whitelist include directory globbing
|
||||
|
||||
## [5.1.5] - 2016-01-29
|
||||
|
||||
### Fixed
|
||||
|
||||
* An exception is now raised when non-existant directories or files are to be added to the code coverage whitelist
|
||||
* Fixed a bug in `PHPUnit_Runner_Version::series()`
|
||||
|
||||
## [5.1.4] - 2016-01-11
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1959](https://github.com/sebastianbergmann/phpunit/issues/1959): Prophecy errors are not handled correctly
|
||||
|
||||
### Fixed
|
||||
|
||||
## [5.1.3] - 2015-12-10
|
||||
|
||||
### Added
|
||||
|
||||
* Added support for `Throwable` to `PHPUnit_Framework_TestCase::throwsException()`
|
||||
|
||||
## [5.1.2] - 2015-12-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed a backwards compatibility break related to the execution order of `@before` and `setUp()` introduced in PHPUnit 5.1.0
|
||||
|
||||
## [5.1.1] - 2015-12-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed a backwards compatibility break in the `PHPUnit_Framework_TestListener` interface introduced in PHPUnit 5.1.0
|
||||
|
||||
## [5.1.0] - 2015-12-04
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#1802](https://github.com/sebastianbergmann/phpunit/issues/1802): Refactor how PHPUnit emits warnings (such as `No tests found in class "Test"`)
|
||||
* Merged [#1824](https://github.com/sebastianbergmann/phpunit/issues/1824): Added support for the `--CLEAN--` and `--EXPECTREGEX--` sections for PHPT test cases
|
||||
* Merged [#1825](https://github.com/sebastianbergmann/phpunit/issues/1825): Redirect STDERR to STDOUT when running PHPT test cases
|
||||
* Merged [#1871](https://github.com/sebastianbergmann/phpunit/issues/1871): Added support for `@testdox` annotations on classes
|
||||
* Merged [#1917](https://github.com/sebastianbergmann/phpunit/issues/1917): Allow `@coversDefaultClass` annotation to work on traits
|
||||
|
||||
[5.1.7]: https://github.com/sebastianbergmann/phpunit/compare/5.1.6...5.1.7
|
||||
[5.1.6]: https://github.com/sebastianbergmann/phpunit/compare/5.1.5...5.1.6
|
||||
[5.1.5]: https://github.com/sebastianbergmann/phpunit/compare/5.1.4...5.1.5
|
||||
[5.1.4]: https://github.com/sebastianbergmann/phpunit/compare/5.1.3...5.1.4
|
||||
[5.1.3]: https://github.com/sebastianbergmann/phpunit/compare/5.1.2...5.1.3
|
||||
[5.1.2]: https://github.com/sebastianbergmann/phpunit/compare/5.1.1...5.1.2
|
||||
[5.1.1]: https://github.com/sebastianbergmann/phpunit/compare/5.1.0...5.1.1
|
||||
[5.1.0]: https://github.com/sebastianbergmann/phpunit/compare/5.0...5.1.0
|
||||
|
||||
117
vendor/phpunit/phpunit/ChangeLog-5.2.md
vendored
117
vendor/phpunit/phpunit/ChangeLog-5.2.md
vendored
@@ -1,117 +0,0 @@
|
||||
# Changes in PHPUnit 5.2
|
||||
|
||||
All notable changes of the PHPUnit 5.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [5.2.12] - 2016-03-15
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2112](https://github.com/sebastianbergmann/phpunit/issues/2112): Output is html entity encoded when ran through `phpdbg`
|
||||
* Fixed [#2118](https://github.com/sebastianbergmann/phpunit/issues/2118): Prophecy integration does not work on PHP 7
|
||||
|
||||
## [5.2.11] - 2016-03-14
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2094](https://github.com/sebastianbergmann/phpunit/issues/2094): Missing argument for `PHPUnit_TextUI_TestRunner::run()`
|
||||
* Fixed [#2109](https://github.com/sebastianbergmann/phpunit/issues/2109): Process isolation leaks global variable
|
||||
|
||||
## [5.2.10] - 2016-03-03
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2039](https://github.com/sebastianbergmann/phpunit/issues/2039): TestDox does not handle snake_case test methods properly
|
||||
* Fixed a bug that caused no code coverage to be generated for tests that execute custom comparators
|
||||
|
||||
## [5.2.9] - 2016-02-19
|
||||
|
||||
### Changed
|
||||
|
||||
* Improved the TestDox HTML report
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2083](https://github.com/sebastianbergmann/phpunit/issues/2083): Restored backwards compatibility in deprecated `setExpectedException()` method
|
||||
|
||||
## [5.2.8] - 2016-02-18
|
||||
|
||||
### Changed
|
||||
|
||||
* Updated dependency information in `composer.json`
|
||||
|
||||
## [5.2.7] - 2016-02-18
|
||||
|
||||
### Changed
|
||||
|
||||
* Improved the typography of the TestDox HTML report
|
||||
|
||||
## [5.2.6] - 2016-02-16
|
||||
|
||||
### Fixed
|
||||
|
||||
* `PHPUnit_Framework_InvalidCoversTargetException` is now properly handled and results in a warning
|
||||
|
||||
## [5.2.5] - 2016-02-13
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2076](https://github.com/sebastianbergmann/phpunit/issues/2076): Code of custom comparators should not result in a test being marked as risky when PHPUnit is strict about @covers annotation usage
|
||||
|
||||
## [5.2.4] - 2016-02-11
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2072](https://github.com/sebastianbergmann/phpunit/issues/2072): Paths in XML configuration file were not handled correctly when they have whitespace around them
|
||||
|
||||
## [5.2.3] - 2016-02-08
|
||||
|
||||
### Removed
|
||||
|
||||
* Removed the implementation of [#1899](https://github.com/sebastianbergmann/phpunit/issues/1899) due to a [bug](https://github.com/sebastianbergmann/php-code-coverage/issues/420) in PHP_CodeCoverage
|
||||
|
||||
## [5.2.2] - 2016-02-07
|
||||
|
||||
### Removed
|
||||
|
||||
* Removed the implementation of [#1902](https://github.com/sebastianbergmann/phpunit/issues/1902) due to [#2042](https://github.com/sebastianbergmann/phpunit/issues/2042)
|
||||
|
||||
## [5.2.1] - 2016-02-05
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2060](https://github.com/sebastianbergmann/phpunit/issues/2060): Allow usage of `sebastian/version` in version 1
|
||||
|
||||
## [5.2.0] - 2016-02-05
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#1899](https://github.com/sebastianbergmann/phpunit/issues/1899): Mark a test as risky that does not execute the code it wants to test
|
||||
* Implemented [#1902](https://github.com/sebastianbergmann/phpunit/issues/1902): Mark a test as risky when it performs an assertion on a test double
|
||||
* Implemented [#1905](https://github.com/sebastianbergmann/phpunit/issues/1905): Add `--fail-on-risky` and `--fail-on-warning` commandline options as well as `failOnRisky` and `failOnWarning` configuration options
|
||||
* Implemented [#1912](https://github.com/sebastianbergmann/phpunit/issues/1912): Add support for specifying the extension version with the `@requires` annotation
|
||||
* Implemented [#1977](https://github.com/sebastianbergmann/phpunit/issues/1977): Add support for disabling annotations that control the ignoring of code coverage
|
||||
* Added `PHPUnit_Framework_TestCase::expectException()`, `PHPUnit_Framework_TestCase::expectExceptionCode()`, `PHPUnit_Framework_TestCase::expectExceptionMessage()`, and `PHPUnit_Framework_TestCase::expectExceptionMessageRegExp()` for programmatically setting expectations for exceptions
|
||||
|
||||
### Changed
|
||||
|
||||
* Deprecated `PHPUnit_Framework_TestCase::setExpectedException()`
|
||||
* Deprecated the `checkForUnintentionallyCoveredCode` configuration setting (use `beStrictAboutCoversAnnotation` instead)
|
||||
|
||||
### Removed
|
||||
|
||||
* The `mapTestClassNameToCoveredClassName` configuration setting has been removed
|
||||
|
||||
[5.2.12]: https://github.com/sebastianbergmann/phpunit/compare/5.2.11...5.2.12
|
||||
[5.2.11]: https://github.com/sebastianbergmann/phpunit/compare/5.2.10...5.2.11
|
||||
[5.2.10]: https://github.com/sebastianbergmann/phpunit/compare/5.2.9...5.2.10
|
||||
[5.2.9]: https://github.com/sebastianbergmann/phpunit/compare/5.2.8...5.2.9
|
||||
[5.2.8]: https://github.com/sebastianbergmann/phpunit/compare/5.2.7...5.2.8
|
||||
[5.2.7]: https://github.com/sebastianbergmann/phpunit/compare/5.2.6...5.2.7
|
||||
[5.2.6]: https://github.com/sebastianbergmann/phpunit/compare/5.2.5...5.2.6
|
||||
[5.2.5]: https://github.com/sebastianbergmann/phpunit/compare/5.2.4...5.2.5
|
||||
[5.2.4]: https://github.com/sebastianbergmann/phpunit/compare/5.2.3...5.2.4
|
||||
[5.2.3]: https://github.com/sebastianbergmann/phpunit/compare/5.2.2...5.2.3
|
||||
[5.2.2]: https://github.com/sebastianbergmann/phpunit/compare/5.2.1...5.2.2
|
||||
[5.2.1]: https://github.com/sebastianbergmann/phpunit/compare/5.2.0...5.2.1
|
||||
[5.2.0]: https://github.com/sebastianbergmann/phpunit/compare/5.1...5.2.0
|
||||
|
||||
55
vendor/phpunit/phpunit/ChangeLog-5.3.md
vendored
55
vendor/phpunit/phpunit/ChangeLog-5.3.md
vendored
@@ -1,55 +0,0 @@
|
||||
# Changes in PHPUnit 5.3
|
||||
|
||||
All notable changes of the PHPUnit 5.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [5.3.5] - 2016-06-03
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [phpunit-mock-objects/#308](https://github.com/sebastianbergmann/phpunit-mock-objects/issues/308): Make sure that PHPUnit 5.3 does not pull in PHPUnit 5.4 dependencies
|
||||
|
||||
## [5.3.4] - 2016-05-11
|
||||
|
||||
### Changed
|
||||
|
||||
* The checks that can be enabled by `--strict-coverage` and `beStrictAboutCoversAnnotation` are no longer performed for tests annotated with `@medium` or `@large`
|
||||
|
||||
## [5.3.3] - 2016-05-10
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2158](https://github.com/sebastianbergmann/phpunit/issues/2158): Failure to run tests in separate processes if a file included into main process contains constant definition
|
||||
|
||||
## [5.3.2] - 2016-04-12
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2134](https://github.com/sebastianbergmann/phpunit/issues/2134): Failures are not shown when there are warnings
|
||||
* Fixed [phpunit-mock-objects/#301](https://github.com/sebastianbergmann/phpunit-mock-objects/issues/301): `PHPUnit_Framework_MockObject_MockBuilder::getMock()` calls `PHPUnit_Framework_TestCase::getMock()` with more arguments than accepted
|
||||
|
||||
## [5.3.1] - 2016-04-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2128](https://github.com/sebastianbergmann/phpunit/issues/2128): PHPUnit 5.3 50% slower than PHPUnit 5.2 (when using large data sets with `@dataProvider`)
|
||||
|
||||
## [5.3.0] - 2016-04-01
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#1984](https://github.com/sebastianbergmann/phpunit/issues/1984): Support for comparison operators to `@requires` annotation
|
||||
* Added `--generate-configuration` option to generate an XML configuration file with suggested settings
|
||||
|
||||
### Changed
|
||||
|
||||
* In strict coverage mode, a test will now be marked as risky when it does not have a `@covers` annotation but is supposed to have one
|
||||
* The passing of test doubles from one test to another has been improved
|
||||
* Implemented [phpunit-mock-objects/#296](https://github.com/sebastianbergmann/phpunit-mock-objects/issues/296): Trigger an error when final or private method is configured on a test double
|
||||
|
||||
[5.3.5]: https://github.com/sebastianbergmann/phpunit/compare/5.3.4...5.3.5
|
||||
[5.3.4]: https://github.com/sebastianbergmann/phpunit/compare/5.3.3...5.3.4
|
||||
[5.3.3]: https://github.com/sebastianbergmann/phpunit/compare/5.3.2...5.3.3
|
||||
[5.3.2]: https://github.com/sebastianbergmann/phpunit/compare/5.3.1...5.3.2
|
||||
[5.3.1]: https://github.com/sebastianbergmann/phpunit/compare/5.3.0...5.3.1
|
||||
[5.3.0]: https://github.com/sebastianbergmann/phpunit/compare/5.2...5.3.0
|
||||
|
||||
84
vendor/phpunit/phpunit/ChangeLog-5.4.md
vendored
84
vendor/phpunit/phpunit/ChangeLog-5.4.md
vendored
@@ -1,84 +0,0 @@
|
||||
# Changes in PHPUnit 5.4
|
||||
|
||||
All notable changes of the PHPUnit 5.4 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [5.4.8] - 2016-07-26
|
||||
|
||||
### Changed
|
||||
|
||||
* Bumped required version of `phpunit/php-code-coverage` to `4.0.1`
|
||||
|
||||
## [5.4.7] - 2016-07-21
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1968](https://github.com/sebastianbergmann/phpunit/issues/1968): Invalid data sets are not handled correctly for `@testWith` annotation
|
||||
* Fixed [#2200](https://github.com/sebastianbergmann/phpunit/issues/2200): No warnings when test runs in separate process
|
||||
* Fixed [#2221](https://github.com/sebastianbergmann/phpunit/issues/2221): `expectException()` accepts non-string argument
|
||||
|
||||
## [5.4.6] - 2016-06-16
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2219](https://github.com/sebastianbergmann/phpunit/issues/2219): PHAR does not contain all dependencies
|
||||
|
||||
## [5.4.5] - 2016-06-15
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2181](https://github.com/sebastianbergmann/phpunit/issues/2181): Use `setlocale()` with `0` as second argument to not affect current setting
|
||||
* Fixed [#2211](https://github.com/sebastianbergmann/phpunit/issues/2211): Correctly handle paths to PHP binary that contain spaces (`C:\Program Files`) on Microsoft Windows
|
||||
|
||||
## [5.4.4] - 2016-06-09
|
||||
|
||||
### Fixed
|
||||
|
||||
* Blacklisted phpdocumentor/reflection-docblock 3.0.2 due to https://github.com/phpDocumentor/ReflectionDocBlock/pull/77
|
||||
|
||||
## [5.4.3] - 2016-06-09
|
||||
|
||||
### Changed
|
||||
|
||||
* Renamed `phpunit\framework\TestCase` to `PHPUnit\Framework\TestCase`
|
||||
|
||||
## [5.4.2] - 2016-06-03
|
||||
|
||||
### Fixed
|
||||
|
||||
* Reverted the JUnit XML logfile format change to restore backward compatibility
|
||||
|
||||
## [5.4.1] - 2016-06-03
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2186](https://github.com/sebastianbergmann/phpunit/issues/2186): `PHPUnit_Framework_TestCase::getMockBuilder()` should be `public`, not `protected`
|
||||
|
||||
## [5.4.0] - 2016-06-03
|
||||
|
||||
### Added
|
||||
|
||||
* Implemented [#2037](https://github.com/sebastianbergmann/phpunit/issues/2037): Log more information about failures in JSON output
|
||||
* Implemented [#2152](https://github.com/sebastianbergmann/phpunit/issues/2152): Filter for which tests TestDox output is generated
|
||||
* Added the `PHPUnit\Framework\TestCase::createMock()` method for creating test doubles using best practice defaults
|
||||
* Added `registerMockObjectsFromTestArgumentsRecursively` configuration directive for optionally registering mock objects from test arguments recursively
|
||||
* Added support for the `ENV`, `STDIN`, `ARGS`, `FILEEOF`, `FILE_EXTERNAL`, `EXPECT_EXTERNAL`, `EXPECTF_EXTERNAL`, `EXPECTREGEX_EXTERNAL`, and `XFAIL` sections to PHPT test runner
|
||||
* Added TestDox XML logger
|
||||
* Added `phpunit\framework\TestCase` as an alias for `PHPUnit_Framework_TestCase` for forward compatibility
|
||||
|
||||
### Changed
|
||||
|
||||
* The `PHPUnit_Framework_TestCase::getMock()` method has been deprecated. Please use `PHPUnit_Framework_TestCase::createMock()` or `PHPUnit_Framework_TestCase::getMockBuilder()` instead.
|
||||
* The `PHPUnit_Framework_TestCase::getMockWithoutInvokingTheOriginalConstructor()` method has been deprecated. Please use `PHPUnit_Framework_TestCase::createMock()` instead.
|
||||
* The logfile format generated using the `--log-junit` option and the `<log type="junit" target="..."/>` configuration directive has been updated to match the [current format used by JUnit](http://llg.cubic.org/docs/junit/). Due to this change you may need to update how your continuous integration server processes test result logfiles generated by PHPUnit.
|
||||
* The methods `PHPUnit_Framework_TestCase::getMockBuilder()`, `PHPUnit_Framework_TestCase::createTestDouble()`, `PHPUnit_Framework_TestCase::getMock()`, `PHPUnit_Framework_TestCase::getMockWithoutInvokingTheOriginalConstructor()`, `PHPUnit_Framework_TestCase::getMockForAbstractClass()` and `PHPUnit_Framework_TestCase::getMockForTrait()` are now protected (they were public before).
|
||||
|
||||
[5.4.8]: https://github.com/sebastianbergmann/phpunit/compare/5.4.7...5.4.8
|
||||
[5.4.7]: https://github.com/sebastianbergmann/phpunit/compare/5.4.6...5.4.7
|
||||
[5.4.6]: https://github.com/sebastianbergmann/phpunit/compare/5.4.5...5.4.6
|
||||
[5.4.5]: https://github.com/sebastianbergmann/phpunit/compare/5.4.4...5.4.5
|
||||
[5.4.4]: https://github.com/sebastianbergmann/phpunit/compare/5.4.3...5.4.4
|
||||
[5.4.3]: https://github.com/sebastianbergmann/phpunit/compare/5.4.2...5.4.3
|
||||
[5.4.2]: https://github.com/sebastianbergmann/phpunit/compare/5.4.1...5.4.2
|
||||
[5.4.1]: https://github.com/sebastianbergmann/phpunit/compare/5.4.0...5.4.1
|
||||
[5.4.0]: https://github.com/sebastianbergmann/phpunit/compare/5.3...5.4.0
|
||||
|
||||
74
vendor/phpunit/phpunit/ChangeLog-5.5.md
vendored
74
vendor/phpunit/phpunit/ChangeLog-5.5.md
vendored
@@ -1,74 +0,0 @@
|
||||
# Changes in PHPUnit 5.5
|
||||
|
||||
All notable changes of the PHPUnit 5.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [5.5.7] - 2016-10-03
|
||||
|
||||
### Changed
|
||||
|
||||
* Reverted [#2300](https://github.com/sebastianbergmann/phpunit/issues/2300): Exclude tests from package distribution
|
||||
|
||||
## [5.5.6] - 2016-10-03
|
||||
|
||||
### Changed
|
||||
|
||||
* Implemented [#2300](https://github.com/sebastianbergmann/phpunit/issues/2300): Exclude tests from package distribution
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2261](https://github.com/sebastianbergmann/phpunit/issues/2261): Invalid test listener configuration leads to confusing behavior
|
||||
* Fixed [#2309](https://github.com/sebastianbergmann/phpunit/pull/2309): `PHPUnit\Framework\TestCase` is not declared `abstract`
|
||||
|
||||
## [5.5.5] - 2016-09-21
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2101](https://github.com/sebastianbergmann/phpunit/issues/2101): Output Buffer Level consumption prevents custom output buffers from working
|
||||
|
||||
## [5.5.4] - 2016-08-26
|
||||
|
||||
New release of PHPUnit as PHAR with updated dependencies
|
||||
|
||||
## [5.5.3] - 2016-08-25
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2270](https://github.com/sebastianbergmann/phpunit/pull/2270): Allow `createPartialMock()` to not mock any methods
|
||||
|
||||
## [5.5.2] - 2016-08-18
|
||||
|
||||
### Changed
|
||||
|
||||
* The JUnit logger no longer uses `<warning>` elements when the `logIncompleteSkipped` configuration option is set to `false` (default)
|
||||
|
||||
### Fixed
|
||||
|
||||
* Restored the `logIncompleteSkipped` configuration option for the JUnit logger that got lost in PHPUnit 5.4.2
|
||||
|
||||
## [5.5.1] - 2016-08-17
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1961](https://github.com/sebastianbergmann/phpunit/issues/1961): XSD schema in 5.x does not validate
|
||||
* Incorrect warning about missing `@covers` annotation is no longer shown when `@coversNothing` is used together with `forceCoversAnnotation=true`
|
||||
|
||||
## [5.5.0] - 2016-08-05
|
||||
|
||||
### Added
|
||||
|
||||
* Added the `PHPUnit\Framework\TestCase::createPartialMock()` method for creating partial test doubles using best practice defaults
|
||||
* Merged [#2203](https://github.com/sebastianbergmann/phpunit/pull/2203): Ability to `--list-suites` for a given configuration
|
||||
|
||||
### Changed
|
||||
|
||||
* An `AssertionError` raised by an `assert()` in the tested code now causes the test to be interpreted as a failure instead of an error
|
||||
|
||||
[5.5.7]: https://github.com/sebastianbergmann/phpunit/compare/5.5.6...5.5.7
|
||||
[5.5.6]: https://github.com/sebastianbergmann/phpunit/compare/5.5.5...5.5.6
|
||||
[5.5.5]: https://github.com/sebastianbergmann/phpunit/compare/5.5.4...5.5.5
|
||||
[5.5.4]: https://github.com/sebastianbergmann/phpunit/compare/5.5.3...5.5.4
|
||||
[5.5.3]: https://github.com/sebastianbergmann/phpunit/compare/5.5.2...5.5.3
|
||||
[5.5.2]: https://github.com/sebastianbergmann/phpunit/compare/5.5.1...5.5.2
|
||||
[5.5.1]: https://github.com/sebastianbergmann/phpunit/compare/5.5.0...5.5.1
|
||||
[5.5.0]: https://github.com/sebastianbergmann/phpunit/compare/5.4...5.5.0
|
||||
|
||||
79
vendor/phpunit/phpunit/ChangeLog-5.6.md
vendored
79
vendor/phpunit/phpunit/ChangeLog-5.6.md
vendored
@@ -1,79 +0,0 @@
|
||||
# Changes in PHPUnit 5.6
|
||||
|
||||
All notable changes of the PHPUnit 5.6 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [5.6.8] - 2016-12-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#1976](https://github.com/sebastianbergmann/phpunit/issues/1976): `str_repeat()` error when using lowest dependencies
|
||||
|
||||
## [5.6.7] - 2016-11-28
|
||||
|
||||
### Changed
|
||||
|
||||
* The logic for not performing the check for unintentionally covered code on `@medium` and `@large` tests has been moved to `php-code-coverage`
|
||||
|
||||
## [5.6.6] - 2016-11-28
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2367](https://github.com/sebastianbergmann/phpunit/pull/2367): Bug in `PHPUnit_Util_Test::parseAnnotationContent()`
|
||||
* Fixed [#2375](https://github.com/sebastianbergmann/phpunit/issues/2375): Invalid regular expression for `--filter` causes PHP warning
|
||||
|
||||
## [5.6.5] - 2016-11-21
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2366](https://github.com/sebastianbergmann/phpunit/issues/2366): Using a test double from a data provider only works once
|
||||
|
||||
### Changed
|
||||
|
||||
Bumped the required versions of `sebastian/comparator`, `sebastian/exporter`, and `sebastian/enumerator`
|
||||
|
||||
## [5.6.4] - 2016-11-18
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2361](https://github.com/sebastianbergmann/phpunit/issues/2361): Conflict with newer versions of `sebastian/recursion-context`
|
||||
|
||||
## [5.6.3] - 2016-11-14
|
||||
|
||||
### Fixed
|
||||
|
||||
* Improved the fix for [#1955](https://github.com/sebastianbergmann/phpunit/issues/1955): Process isolation fails when running tests with `phpdbg -qrr`
|
||||
|
||||
## [5.6.2] - 2016-10-25
|
||||
|
||||
New PHAR release due to updated dependencies
|
||||
|
||||
## [5.6.1] - 2016-10-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#2320](https://github.com/sebastianbergmann/phpunit/issues/2320): Conflict between `PHPUnit_Framework_TestCase::getDataSet()` and `PHPUnit_Extensions_Database_TestCase::getDataSet()`
|
||||
|
||||
## [5.6.0] - 2016-10-07
|
||||
|
||||
### Added
|
||||
|
||||
* Merged [#2240](https://github.com/sebastianbergmann/phpunit/pull/2240): Provide access to a test case's data set (for use in `setUp()`, for instance)
|
||||
* Merged [#2262](https://github.com/sebastianbergmann/phpunit/pull/2262): Add the `PHPUnit_Framework_Constraint_DirectoryExists`, `PHPUnit_Framework_Constraint_IsReadable`, and `PHPUnit_Framework_Constraint_IsWritable` constraints as well as the `assertIsReadable()`, `assertNotIsReadable()`, `assertIsWritable()`, `assertNotIsWritable()`, `assertDirectoryExists()`, `assertDirectoryNotExists()`, `assertDirectoryIsReadable()`, `assertDirectoryNotIsReadable()`, `assertDirectoryIsWritable()`, `assertDirectoryNotIsWritable()`, `assertFileIsReadable()`, `assertFileNotIsReadable()`, `assertFileIsWritable()`, and `assertFileNotIsWritable()` assertions
|
||||
* Added `PHPUnit\Framework\TestCase::createConfiguredMock()` based on [idea](https://twitter.com/kriswallsmith/status/763550169090625536) by Kris Wallsmith
|
||||
* Added the `@doesNotPerformAssertions` annotation for excluding a test from the "useless test" risky test check
|
||||
|
||||
### Changed
|
||||
|
||||
* Deprecated `PHPUnit\Framework\TestCase::setExpectedExceptionRegExp()`
|
||||
* `PHPUnit_Util_Printer` no longer optionally cleans up HTML output using `ext/tidy`
|
||||
|
||||
[5.6.8]: https://github.com/sebastianbergmann/phpunit/compare/5.6.7...5.6.8
|
||||
[5.6.7]: https://github.com/sebastianbergmann/phpunit/compare/5.6.6...5.6.7
|
||||
[5.6.6]: https://github.com/sebastianbergmann/phpunit/compare/5.6.5...5.6.6
|
||||
[5.6.5]: https://github.com/sebastianbergmann/phpunit/compare/5.6.4...5.6.5
|
||||
[5.6.4]: https://github.com/sebastianbergmann/phpunit/compare/5.6.3...5.6.4
|
||||
[5.6.3]: https://github.com/sebastianbergmann/phpunit/compare/5.6.2...5.6.3
|
||||
[5.6.2]: https://github.com/sebastianbergmann/phpunit/compare/5.6.1...5.6.2
|
||||
[5.6.1]: https://github.com/sebastianbergmann/phpunit/compare/5.6.0...5.6.1
|
||||
[5.6.0]: https://github.com/sebastianbergmann/phpunit/compare/5.5...5.6.0
|
||||
|
||||
196
vendor/phpunit/phpunit/ChangeLog-5.7.md
vendored
196
vendor/phpunit/phpunit/ChangeLog-5.7.md
vendored
@@ -1,196 +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.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.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
|
||||
|
||||
290
vendor/phpunit/phpunit/ChangeLog-8.5.md
vendored
Normal file
290
vendor/phpunit/phpunit/ChangeLog-8.5.md
vendored
Normal file
@@ -0,0 +1,290 @@
|
||||
# Changes in PHPUnit 8.5
|
||||
|
||||
All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [8.5.31] - 2022-10-28
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#5076](https://github.com/sebastianbergmann/phpunit/issues/5076): Test Runner does not warn about conflicting options
|
||||
|
||||
## [8.5.30] - 2022-09-25
|
||||
|
||||
### Changed
|
||||
|
||||
* The configuration generator now asks for a cache directory
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4913](https://github.com/sebastianbergmann/phpunit/issues/4913): Failed `assert()` should show a backtrace
|
||||
* [#4966](https://github.com/sebastianbergmann/phpunit/issues/4966): `TestCase::assertSame()` (and related exact comparisons) must compare `float` exactly
|
||||
|
||||
## [8.5.29] - 2022-08-22
|
||||
|
||||
### Changed
|
||||
|
||||
* [#5033](https://github.com/sebastianbergmann/phpunit/issues/5033): Do not depend on phpspec/prophecy
|
||||
|
||||
## [8.5.28] - 2022-07-29
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#5015](https://github.com/sebastianbergmann/phpunit/pull/5015): Ukraine banner unreadable on black background
|
||||
* [#5016](https://github.com/sebastianbergmann/phpunit/issues/5016): PHPUnit 8.5.27 does not work on PHP 7.2.0-7.2.18 and PHP 7.3.0-7.3.5
|
||||
|
||||
## [8.5.27] - 2022-06-19
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4950](https://github.com/sebastianbergmann/phpunit/issues/4950): False error on `atMost()` invocation rule without call
|
||||
* [#4962](https://github.com/sebastianbergmann/phpunit/issues/4962): Ukraine banner unreadable on white background
|
||||
|
||||
## [8.5.26] - 2022-04-01
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4938](https://github.com/sebastianbergmann/phpunit/issues/4938): Test Double code generator does not handle `void` return type declaration on `__clone()` methods
|
||||
|
||||
## [8.5.25] - 2022-03-16
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4934](https://github.com/sebastianbergmann/phpunit/issues/4934): Code Coverage does not work with PHPUnit 8.5.24 PHAR on PHP 7
|
||||
|
||||
## [8.5.24] - 2022-03-05 - #StandWithUkraine
|
||||
|
||||
### Changed
|
||||
|
||||
* [#4874](https://github.com/sebastianbergmann/phpunit/pull/4874): `PHP_FLOAT_EPSILON` is now used instead of hardcoded `0.0000000001` in `PHPUnit\Framework\Constraint\IsIdentical`
|
||||
|
||||
### Fixed
|
||||
|
||||
* When the HTML code coverage report's configured low upper bound is larger than the high lower bound then the default values are used instead
|
||||
|
||||
## [8.5.23] - 2022-01-21
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4799](https://github.com/sebastianbergmann/phpunit/pull/4799): Memory leaks in `PHPUnit\Framework\TestSuite` class
|
||||
* [#4857](https://github.com/sebastianbergmann/phpunit/pull/4857): Result of `debug_backtrace()` is not used correctly
|
||||
|
||||
## [8.5.22] - 2021-12-25
|
||||
|
||||
### Changed
|
||||
|
||||
* [#4812](https://github.com/sebastianbergmann/phpunit/issues/4812): Do not enforce time limits when a debugging session through DBGp is active
|
||||
* [#4835](https://github.com/sebastianbergmann/phpunit/issues/4835): Support for `$GLOBALS['_composer_autoload_path']` introduced in Composer 2.2
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4840](https://github.com/sebastianbergmann/phpunit/pull/4840): TestDox prettifying for class names does not correctly handle diacritics
|
||||
* [#4846](https://github.com/sebastianbergmann/phpunit/pull/4846): Composer proxy script is not ignored
|
||||
|
||||
## [8.5.21] - 2021-09-25
|
||||
|
||||
### Changed
|
||||
|
||||
* PHPUnit no longer converts PHP deprecations to exceptions by default (configure `convertDeprecationsToExceptions="true"` to enable this)
|
||||
* The PHPUnit XML configuration file generator now configures `convertDeprecationsToExceptions="true"`
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4772](https://github.com/sebastianbergmann/phpunit/pull/4772): TestDox HTML report not displayed correctly when browser has custom colour settings
|
||||
|
||||
## [8.5.20] - 2021-08-31
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4751](https://github.com/sebastianbergmann/phpunit/issues/4751): Configuration validation fails when using brackets in glob pattern
|
||||
|
||||
## [8.5.19] - 2021-07-31
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4740](https://github.com/sebastianbergmann/phpunit/issues/4740): `phpunit.phar` does not work with PHP 8.1
|
||||
|
||||
## [8.5.18] - 2021-07-19
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4720](https://github.com/sebastianbergmann/phpunit/issues/4720): PHPUnit does not verify its own PHP extension requirements
|
||||
|
||||
## [8.5.17] - 2021-06-23
|
||||
|
||||
### Changed
|
||||
|
||||
* PHPUnit now errors out on startup when `PHP_VERSION` contains a value that is not compatible with `version_compare()`, for instance `X.Y.Z-(to be removed in future macOS)`
|
||||
|
||||
## [8.5.16] - 2021-06-05
|
||||
|
||||
### Changed
|
||||
|
||||
* The test result cache (the storage for which is implemented in `PHPUnit\Runner\DefaultTestResultCache`) no longer uses PHP's `serialize()` and `unserialize()` functions for persistence. It now uses a versioned JSON format instead that is independent of PHP implementation details (see [#3581](https://github.com/sebastianbergmann/phpunit/issues/3581) and [#4662](https://github.com/sebastianbergmann/phpunit/pull/4662) for examples why this is a problem). When PHPUnit tries to load the test result cache from a file that does not exist, or from a file that does not contain data in JSON format, or from a file that contains data in a JSON format version other than the one used by the currently running PHPUnit version, then this is considered to be a "cache miss". An empty `DefaultTestResultCache` object is created in this case. This should also prevent PHPUnit from crashing when trying to load a test result cache file created by a different version of PHPUnit (see [#4580](https://github.com/sebastianbergmann/phpunit/issues/4580) for example).
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4663](https://github.com/sebastianbergmann/phpunit/issues/4663): `TestCase::expectError()` works on PHP 7.3, but not on PHP >= 7.4
|
||||
* [#4678](https://github.com/sebastianbergmann/phpunit/pull/4678): Stubbed methods with `iterable` return types should return empty array by default
|
||||
* [#4692](https://github.com/sebastianbergmann/phpunit/issues/4692): Annotations in single-line doc-comments are not handled correctly
|
||||
* [#4694](https://github.com/sebastianbergmann/phpunit/issues/4694): `TestCase::getMockFromWsdl()` does not work with PHP 8.1-dev
|
||||
|
||||
## [8.5.15] - 2021-03-17
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4591](https://github.com/sebastianbergmann/phpunit/issues/4591): TeamCity logger logs warnings as test failures
|
||||
|
||||
## [8.5.14] - 2021-01-17
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4535](https://github.com/sebastianbergmann/phpunit/issues/4535): `getMockFromWsdl()` does not handle methods that do not have parameters correctly
|
||||
* [#4572](https://github.com/sebastianbergmann/phpunit/issues/4572): Schema validation does not work with `%xx` sequences in path to `phpunit.xsd`
|
||||
* [#4575](https://github.com/sebastianbergmann/phpunit/issues/4575): PHPUnit 8.5 incompatibility with PHP 8.1
|
||||
|
||||
## [8.5.13] - 2020-12-01
|
||||
|
||||
### Fixed
|
||||
|
||||
* Running tests in isolated processes did not work with PHP 8 on Windows
|
||||
|
||||
## [8.5.12] - 2020-11-30
|
||||
|
||||
### Changed
|
||||
|
||||
* Changed PHP version constraint in `composer.json` from `^7.2` to `>=7.2` to allow the installation of PHPUnit 8.5 on PHP 8. Please note that the code coverage functionality is not available for PHPUnit 8.5 on PHP 8.
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4529](https://github.com/sebastianbergmann/phpunit/issues/4529): Debug mode of Xdebug 2 is not disabled for PHPT tests
|
||||
|
||||
## [8.5.11] - 2020-11-27
|
||||
|
||||
### Changed
|
||||
|
||||
* Bumped required version of `phpunit/php-code-coverage`
|
||||
|
||||
## [8.5.10] - 2020-11-27
|
||||
|
||||
### Added
|
||||
|
||||
* Support for Xdebug 3
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4516](https://github.com/sebastianbergmann/phpunit/issues/4516): `phpunit/phpunit-selenium` does not work with PHPUnit 8.5.9
|
||||
|
||||
## [8.5.9] - 2020-11-10
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#3965](https://github.com/sebastianbergmann/phpunit/issues/3965): Process Isolation throws exceptions when PHPDBG is used
|
||||
* [#4470](https://github.com/sebastianbergmann/phpunit/pull/4470): Infinite recursion when `--static-backup --strict-global-state` is used
|
||||
|
||||
## [8.5.8] - 2020-06-22
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4312](https://github.com/sebastianbergmann/phpunit/issues/4312): Fix for [#4299](https://github.com/sebastianbergmann/phpunit/issues/4299) breaks backward compatibility
|
||||
|
||||
## [8.5.7] - 2020-06-21
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4299](https://github.com/sebastianbergmann/phpunit/issues/4299): "No tests executed" does not always result in exit code `1`
|
||||
* [#4306](https://github.com/sebastianbergmann/phpunit/issues/4306): Exceptions during code coverage driver initialization are not handled correctly
|
||||
|
||||
## [8.5.6] - 2020-06-15
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4211](https://github.com/sebastianbergmann/phpunit/issues/4211): `phpdbg_*()` functions are scoped to `PHPUnit\phpdbg_*()`
|
||||
|
||||
## [8.5.5] - 2020-05-22
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4033](https://github.com/sebastianbergmann/phpunit/issues/4033): Unexpected behaviour when `$GLOBALS` is deleted
|
||||
|
||||
## [8.5.4] - 2020-04-23
|
||||
|
||||
### Changed
|
||||
|
||||
* Changed how `PHPUnit\TextUI\Command` passes warnings to `PHPUnit\TextUI\TestRunner`
|
||||
|
||||
## [8.5.3] - 2020-03-31
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4017](https://github.com/sebastianbergmann/phpunit/issues/4017): Do not suggest refactoring to something that is also deprecated
|
||||
* [#4133](https://github.com/sebastianbergmann/phpunit/issues/4133): `expectExceptionMessageRegExp()` has been removed in PHPUnit 9 without a deprecation warning being given in PHPUnit 8
|
||||
* [#4139](https://github.com/sebastianbergmann/phpunit/issues/4139): Cannot double interfaces that declare a constructor with PHP 8
|
||||
* [#4144](https://github.com/sebastianbergmann/phpunit/issues/4144): Empty objects are converted to empty arrays in JSON comparison failure diff
|
||||
|
||||
## [8.5.2] - 2020-01-08
|
||||
|
||||
### Removed
|
||||
|
||||
* `eval-stdin.php` has been removed, it was not used anymore since PHPUnit 7.2.7
|
||||
|
||||
## [8.5.1] - 2019-12-25
|
||||
|
||||
### Changed
|
||||
|
||||
* `eval-stdin.php` can now only be executed with `cli` and `phpdbg`
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#3983](https://github.com/sebastianbergmann/phpunit/issues/3983): Deprecation warning given too eagerly
|
||||
|
||||
## [8.5.0] - 2019-12-06
|
||||
|
||||
### Added
|
||||
|
||||
* [#3911](https://github.com/sebastianbergmann/phpunit/issues/3911): Support combined use of `addMethods()` and `onlyMethods()`
|
||||
* [#3949](https://github.com/sebastianbergmann/phpunit/issues/3949): Introduce specialized assertions `assertFileEqualsCanonicalizing()`, `assertFileEqualsIgnoringCase()`, `assertStringEqualsFileCanonicalizing()`, `assertStringEqualsFileIgnoringCase()`, `assertFileNotEqualsCanonicalizing()`, `assertFileNotEqualsIgnoringCase()`, `assertStringNotEqualsFileCanonicalizing()`, and `assertStringNotEqualsFileIgnoringCase()` as alternative to using `assertFileEquals()` etc. with optional parameters
|
||||
|
||||
### Changed
|
||||
|
||||
* [#3860](https://github.com/sebastianbergmann/phpunit/pull/3860): Deprecate invoking PHPUnit commandline test runner with just a class name
|
||||
* [#3950](https://github.com/sebastianbergmann/phpunit/issues/3950): Deprecate optional parameters of `assertFileEquals()` etc.
|
||||
* [#3955](https://github.com/sebastianbergmann/phpunit/issues/3955): Deprecate support for doubling multiple interfaces
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#3953](https://github.com/sebastianbergmann/phpunit/issues/3953): Code Coverage for test executed in isolation does not work when the PHAR is used
|
||||
* [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable`
|
||||
* [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside
|
||||
|
||||
[8.5.31]: https://github.com/sebastianbergmann/phpunit/compare/8.5.30...8.5.31
|
||||
[8.5.30]: https://github.com/sebastianbergmann/phpunit/compare/8.5.29...8.5.30
|
||||
[8.5.29]: https://github.com/sebastianbergmann/phpunit/compare/8.5.28...8.5.29
|
||||
[8.5.28]: https://github.com/sebastianbergmann/phpunit/compare/8.5.27...8.5.28
|
||||
[8.5.27]: https://github.com/sebastianbergmann/phpunit/compare/8.5.26...8.5.27
|
||||
[8.5.26]: https://github.com/sebastianbergmann/phpunit/compare/8.5.25...8.5.26
|
||||
[8.5.25]: https://github.com/sebastianbergmann/phpunit/compare/8.5.24...8.5.25
|
||||
[8.5.24]: https://github.com/sebastianbergmann/phpunit/compare/8.5.23...8.5.24
|
||||
[8.5.23]: https://github.com/sebastianbergmann/phpunit/compare/8.5.22...8.5.23
|
||||
[8.5.22]: https://github.com/sebastianbergmann/phpunit/compare/8.5.21...8.5.22
|
||||
[8.5.21]: https://github.com/sebastianbergmann/phpunit/compare/8.5.20...8.5.21
|
||||
[8.5.20]: https://github.com/sebastianbergmann/phpunit/compare/8.5.19...8.5.20
|
||||
[8.5.19]: https://github.com/sebastianbergmann/phpunit/compare/8.5.18...8.5.19
|
||||
[8.5.18]: https://github.com/sebastianbergmann/phpunit/compare/8.5.17...8.5.18
|
||||
[8.5.17]: https://github.com/sebastianbergmann/phpunit/compare/8.5.16...8.5.17
|
||||
[8.5.16]: https://github.com/sebastianbergmann/phpunit/compare/8.5.15...8.5.16
|
||||
[8.5.15]: https://github.com/sebastianbergmann/phpunit/compare/8.5.14...8.5.15
|
||||
[8.5.14]: https://github.com/sebastianbergmann/phpunit/compare/8.5.13...8.5.14
|
||||
[8.5.13]: https://github.com/sebastianbergmann/phpunit/compare/8.5.12...8.5.13
|
||||
[8.5.12]: https://github.com/sebastianbergmann/phpunit/compare/8.5.11...8.5.12
|
||||
[8.5.11]: https://github.com/sebastianbergmann/phpunit/compare/8.5.10...8.5.11
|
||||
[8.5.10]: https://github.com/sebastianbergmann/phpunit/compare/8.5.9...8.5.10
|
||||
[8.5.9]: https://github.com/sebastianbergmann/phpunit/compare/8.5.8...8.5.9
|
||||
[8.5.8]: https://github.com/sebastianbergmann/phpunit/compare/8.5.7...8.5.8
|
||||
[8.5.7]: https://github.com/sebastianbergmann/phpunit/compare/8.5.6...8.5.7
|
||||
[8.5.6]: https://github.com/sebastianbergmann/phpunit/compare/8.5.5...8.5.6
|
||||
[8.5.5]: https://github.com/sebastianbergmann/phpunit/compare/8.5.4...8.5.5
|
||||
[8.5.4]: https://github.com/sebastianbergmann/phpunit/compare/8.5.3...8.5.4
|
||||
[8.5.3]: https://github.com/sebastianbergmann/phpunit/compare/8.5.2...8.5.3
|
||||
[8.5.2]: https://github.com/sebastianbergmann/phpunit/compare/8.5.1...8.5.2
|
||||
[8.5.1]: https://github.com/sebastianbergmann/phpunit/compare/8.5.0...8.5.1
|
||||
[8.5.0]: https://github.com/sebastianbergmann/phpunit/compare/8.4.3...8.5.0
|
||||
242
vendor/phpunit/phpunit/ChangeLog-9.5.md
vendored
Normal file
242
vendor/phpunit/phpunit/ChangeLog-9.5.md
vendored
Normal file
@@ -0,0 +1,242 @@
|
||||
# Changes in PHPUnit 9.5
|
||||
|
||||
All notable changes of the PHPUnit 9.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [9.5.27] - 2022-12-09
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#5113](https://github.com/sebastianbergmann/phpunit/pull/5113): PHP error instead of PHPUnit error when trying to create test double for `readonly` class
|
||||
|
||||
## [9.5.26] - 2022-10-28
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#5076](https://github.com/sebastianbergmann/phpunit/issues/5076): Test Runner does not warn about conflicting options
|
||||
|
||||
## [9.5.25] - 2022-09-25
|
||||
|
||||
### Added
|
||||
|
||||
* [#5042](https://github.com/sebastianbergmann/phpunit/issues/5042): Support Disjunctive Normal Form types
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4966](https://github.com/sebastianbergmann/phpunit/issues/4966): `TestCase::assertSame()` (and related exact comparisons) must compare `float` exactly
|
||||
|
||||
## [9.5.24] - 2022-08-30
|
||||
|
||||
### Added
|
||||
|
||||
* [#4931](https://github.com/sebastianbergmann/phpunit/issues/4931): Support `null` and `false` as stand-alone types
|
||||
* [#4955](https://github.com/sebastianbergmann/phpunit/issues/4955): Support `true` as stand-alone type
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4913](https://github.com/sebastianbergmann/phpunit/issues/4913): Failed `assert()` should show a backtrace
|
||||
* [#5012](https://github.com/sebastianbergmann/phpunit/pull/5012): Memory leak in `ExceptionWrapper`
|
||||
|
||||
## [9.5.23] - 2022-08-22
|
||||
|
||||
### Changed
|
||||
|
||||
* [#5033](https://github.com/sebastianbergmann/phpunit/issues/5033): Do not depend on phpspec/prophecy
|
||||
|
||||
## [9.5.22] - 2022-08-20
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#5015](https://github.com/sebastianbergmann/phpunit/pull/5015): Ukraine banner unreadable on black background
|
||||
* [#5020](https://github.com/sebastianbergmann/phpunit/issues/5020): PHPUnit 9 breaks loading of PSR-0/PEAR style classes
|
||||
* [#5022](https://github.com/sebastianbergmann/phpunit/issues/5022): `ExcludeList::addDirectory()` does not work correctly
|
||||
|
||||
## [9.5.21] - 2022-06-19
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4950](https://github.com/sebastianbergmann/phpunit/issues/4950): False error on `atMost()` invocation rule without call
|
||||
* [#4962](https://github.com/sebastianbergmann/phpunit/issues/4962): Ukraine banner unreadable on white background
|
||||
|
||||
## [9.5.20] - 2022-04-01
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4938](https://github.com/sebastianbergmann/phpunit/issues/4938): Test Double code generator does not handle `void` return type declaration on `__clone()` methods
|
||||
* [#4947](https://github.com/sebastianbergmann/phpunit/issues/4947): Test annotated with `@coversNothing` may lead to files missing from code coverage report
|
||||
|
||||
## [9.5.19] - 2022-03-15
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4929](https://github.com/sebastianbergmann/phpunit/issues/4929): Test Double code generator does not handle new expressions inside parameter default values
|
||||
* [#4932](https://github.com/sebastianbergmann/phpunit/issues/4932): Backport support for intersection types from PHPUnit 10 to PHPUnit 9.5
|
||||
* [#4933](https://github.com/sebastianbergmann/phpunit/issues/4933): Backport support for `never` type from PHPUnit 10 to PHPUnit 9.5
|
||||
|
||||
## [9.5.18] - 2022-03-08
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4877](https://github.com/sebastianbergmann/phpunit/issues/4877): No stack trace shown when an error occurs during bootstrap
|
||||
|
||||
## [9.5.17] - 2022-03-05 - #StandWithUkraine
|
||||
|
||||
## [9.5.16] - 2022-02-23
|
||||
|
||||
### Changed
|
||||
|
||||
* Reverted sync with API change in (now yanked) phpunit/php-code-coverage 9.2.12
|
||||
|
||||
## [9.5.15] - 2022-02-23 [YANKED]
|
||||
|
||||
### Fixed
|
||||
|
||||
* When the HTML code coverage report's configured low upper bound is larger than the high lower bound then the default values are used instead
|
||||
|
||||
## [9.5.14] - 2022-02-18
|
||||
|
||||
### Changed
|
||||
|
||||
* [#4874](https://github.com/sebastianbergmann/phpunit/pull/4874): `PHP_FLOAT_EPSILON` is now used instead of hardcoded `0.0000000001` in `PHPUnit\Framework\Constraint\IsIdentical`
|
||||
|
||||
## [9.5.13] - 2022-01-24
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4871](https://github.com/sebastianbergmann/phpunit/issues/4871): Class `SebastianBergmann\CodeCoverage\Filter` is not found during PHPT tests when PHPUnit is used from PHAR
|
||||
|
||||
## [9.5.12] - 2022-01-21
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4799](https://github.com/sebastianbergmann/phpunit/pull/4799): Memory leaks in `PHPUnit\Framework\TestSuite` class
|
||||
* [#4857](https://github.com/sebastianbergmann/phpunit/pull/4857): Result of `debug_backtrace()` is not used correctly
|
||||
|
||||
## [9.5.11] - 2021-12-25
|
||||
|
||||
### Changed
|
||||
|
||||
* [#4812](https://github.com/sebastianbergmann/phpunit/issues/4812): Do not enforce time limits when a debugging session through DBGp is active
|
||||
* [#4835](https://github.com/sebastianbergmann/phpunit/issues/4835): Support for `$GLOBALS['_composer_autoload_path']` introduced in Composer 2.2
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4840](https://github.com/sebastianbergmann/phpunit/pull/4840): TestDox prettifying for class names does not correctly handle diacritics
|
||||
* [#4846](https://github.com/sebastianbergmann/phpunit/pull/4846): Composer proxy script is not ignored
|
||||
|
||||
## [9.5.10] - 2021-09-25
|
||||
|
||||
### Changed
|
||||
|
||||
* PHPUnit no longer converts PHP deprecations to exceptions by default (configure `convertDeprecationsToExceptions="true"` to enable this)
|
||||
* The PHPUnit XML configuration file generator now configures `convertDeprecationsToExceptions="true"`
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4772](https://github.com/sebastianbergmann/phpunit/pull/4772): TestDox HTML report not displayed correctly when browser has custom colour settings
|
||||
|
||||
## [9.5.9] - 2021-08-31
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4750](https://github.com/sebastianbergmann/phpunit/issues/4750): Automatic return value generation leads to invalid (and superfluous) test double code generation when a stubbed method returns `*|false`
|
||||
* [#4751](https://github.com/sebastianbergmann/phpunit/issues/4751): Configuration validation fails when using brackets in glob pattern
|
||||
|
||||
## [9.5.8] - 2021-07-31
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4740](https://github.com/sebastianbergmann/phpunit/issues/4740): `phpunit.phar` does not work with PHP 8.1
|
||||
|
||||
## [9.5.7] - 2021-07-19
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4720](https://github.com/sebastianbergmann/phpunit/issues/4720): PHPUnit does not verify its own PHP extension requirements
|
||||
* [#4735](https://github.com/sebastianbergmann/phpunit/issues/4735): Automated return value generation does not work for stubbed methods that return `*|false`
|
||||
|
||||
## [9.5.6] - 2021-06-23
|
||||
|
||||
### Changed
|
||||
|
||||
* PHPUnit now errors out on startup when `PHP_VERSION` contains a value that is not compatible with `version_compare()`, for instance `X.Y.Z-(to be removed in future macOS)`
|
||||
|
||||
## [9.5.5] - 2021-06-05
|
||||
|
||||
### Changed
|
||||
|
||||
* The test result cache (the storage for which is implemented in `PHPUnit\Runner\DefaultTestResultCache`) no longer uses PHP's `serialize()` and `unserialize()` functions for persistence. It now uses a versioned JSON format instead that is independent of PHP implementation details (see [#3581](https://github.com/sebastianbergmann/phpunit/issues/3581) and [#4662](https://github.com/sebastianbergmann/phpunit/pull/4662) for examples why this is a problem). When PHPUnit tries to load the test result cache from a file that does not exist, or from a file that does not contain data in JSON format, or from a file that contains data in a JSON format version other than the one used by the currently running PHPUnit version, then this is considered to be a "cache miss". An empty `DefaultTestResultCache` object is created in this case. This should also prevent PHPUnit from crashing when trying to load a test result cache file created by a different version of PHPUnit (see [#4580](https://github.com/sebastianbergmann/phpunit/issues/4580) for example).
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4632](https://github.com/sebastianbergmann/phpunit/issues/4632): TestDox result printer does not handle repeated test execution correctly
|
||||
* [#4678](https://github.com/sebastianbergmann/phpunit/pull/4678): Stubbed methods with `iterable` return types should return empty array by default
|
||||
* [#4692](https://github.com/sebastianbergmann/phpunit/issues/4692): Annotations in single-line doc-comments are not handled correctly
|
||||
* [#4694](https://github.com/sebastianbergmann/phpunit/issues/4694): `TestCase::getMockFromWsdl()` does not work with PHP 8.1-dev
|
||||
|
||||
## [9.5.4] - 2021-03-23
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4630](https://github.com/sebastianbergmann/phpunit/issues/4630): Empty test case class causes error in TestDox XML logger
|
||||
|
||||
## [9.5.3] - 2021-03-17
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4591](https://github.com/sebastianbergmann/phpunit/issues/4591): TeamCity logger logs warnings as test failures
|
||||
* [#4620](https://github.com/sebastianbergmann/phpunit/issues/4620): No useful output when an error occurs in the bootstrap script
|
||||
|
||||
## [9.5.2] - 2021-02-02
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4573](https://github.com/sebastianbergmann/phpunit/issues/4573): No stack trace printed when PHPUnit is used from PHAR
|
||||
* [#4590](https://github.com/sebastianbergmann/phpunit/issues/4590): `--coverage-text` CLI option is documented wrong
|
||||
|
||||
## [9.5.1] - 2021-01-17
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4572](https://github.com/sebastianbergmann/phpunit/issues/4572): Schema validation does not work with `%xx` sequences in path to `phpunit.xsd`
|
||||
|
||||
## [9.5.0] - 2020-12-04
|
||||
|
||||
### Changed
|
||||
|
||||
* [#4490](https://github.com/sebastianbergmann/phpunit/issues/4490): Emit Error instead of Warning when test case class cannot be instantiated
|
||||
* [#4491](https://github.com/sebastianbergmann/phpunit/issues/4491): Emit Error instead of Warning when data provider does not work correctly
|
||||
* [#4492](https://github.com/sebastianbergmann/phpunit/issues/4492): Emit Error instead of Warning when test double configuration is invalid
|
||||
* [#4493](https://github.com/sebastianbergmann/phpunit/issues/4493): Emit error when (configured) test directory does not exist
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4535](https://github.com/sebastianbergmann/phpunit/issues/4535): `getMockFromWsdl()` does not handle methods that do not have parameters correctly
|
||||
|
||||
[9.5.27]: https://github.com/sebastianbergmann/phpunit/compare/9.5.26...9.5.27
|
||||
[9.5.26]: https://github.com/sebastianbergmann/phpunit/compare/9.5.25...9.5.26
|
||||
[9.5.25]: https://github.com/sebastianbergmann/phpunit/compare/9.5.24...9.5.25
|
||||
[9.5.24]: https://github.com/sebastianbergmann/phpunit/compare/9.5.23...9.5.24
|
||||
[9.5.23]: https://github.com/sebastianbergmann/phpunit/compare/9.5.22...9.5.23
|
||||
[9.5.22]: https://github.com/sebastianbergmann/phpunit/compare/9.5.21...9.5.22
|
||||
[9.5.21]: https://github.com/sebastianbergmann/phpunit/compare/9.5.20...9.5.21
|
||||
[9.5.20]: https://github.com/sebastianbergmann/phpunit/compare/9.5.19...9.5.20
|
||||
[9.5.19]: https://github.com/sebastianbergmann/phpunit/compare/9.5.18...9.5.19
|
||||
[9.5.18]: https://github.com/sebastianbergmann/phpunit/compare/9.5.17...9.5.18
|
||||
[9.5.17]: https://github.com/sebastianbergmann/phpunit/compare/9.5.16...9.5.17
|
||||
[9.5.16]: https://github.com/sebastianbergmann/phpunit/compare/dc738383c519243b0a967f63943a848d3fd861aa...9.5.16
|
||||
[9.5.15]: https://github.com/sebastianbergmann/phpunit/compare/9.5.14...dc738383c519243b0a967f63943a848d3fd861aa
|
||||
[9.5.14]: https://github.com/sebastianbergmann/phpunit/compare/9.5.13...9.5.14
|
||||
[9.5.13]: https://github.com/sebastianbergmann/phpunit/compare/9.5.12...9.5.13
|
||||
[9.5.12]: https://github.com/sebastianbergmann/phpunit/compare/9.5.11...9.5.12
|
||||
[9.5.11]: https://github.com/sebastianbergmann/phpunit/compare/9.5.10...9.5.11
|
||||
[9.5.10]: https://github.com/sebastianbergmann/phpunit/compare/9.5.9...9.5.10
|
||||
[9.5.9]: https://github.com/sebastianbergmann/phpunit/compare/9.5.8...9.5.9
|
||||
[9.5.8]: https://github.com/sebastianbergmann/phpunit/compare/9.5.7...9.5.8
|
||||
[9.5.7]: https://github.com/sebastianbergmann/phpunit/compare/9.5.6...9.5.7
|
||||
[9.5.6]: https://github.com/sebastianbergmann/phpunit/compare/9.5.5...9.5.6
|
||||
[9.5.5]: https://github.com/sebastianbergmann/phpunit/compare/9.5.4...9.5.5
|
||||
[9.5.4]: https://github.com/sebastianbergmann/phpunit/compare/9.5.3...9.5.4
|
||||
[9.5.3]: https://github.com/sebastianbergmann/phpunit/compare/9.5.2...9.5.3
|
||||
[9.5.2]: https://github.com/sebastianbergmann/phpunit/compare/9.5.1...9.5.2
|
||||
[9.5.1]: https://github.com/sebastianbergmann/phpunit/compare/9.5.0...9.5.1
|
||||
[9.5.0]: https://github.com/sebastianbergmann/phpunit/compare/9.4.4...9.5.0
|
||||
46
vendor/phpunit/phpunit/LICENSE
vendored
46
vendor/phpunit/phpunit/LICENSE
vendored
@@ -1,33 +1,29 @@
|
||||
PHPUnit
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2001-2017, Sebastian Bergmann <sebastian@phpunit.de>.
|
||||
Copyright (c) 2001-2022, Sebastian Bergmann
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Sebastian Bergmann nor the names of his
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
33
vendor/phpunit/phpunit/README.md
vendored
33
vendor/phpunit/phpunit/README.md
vendored
@@ -1,32 +1,27 @@
|
||||
<h1 align="center">🇺🇦 <a href="https://phpunit.de/stand-with-ukraine.html">UKRAINE NEEDS YOUR HELP NOW!</a></h1>
|
||||
|
||||
# PHPUnit
|
||||
|
||||
PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks.
|
||||
|
||||
[](https://packagist.org/packages/phpunit/phpunit)
|
||||
[](https://php.net/)
|
||||
[](https://phpunit.de/build-status.html)
|
||||
[](https://php.net/)
|
||||
[](https://phpunit.de/build-status.html)
|
||||
[](https://shepherd.dev/github/sebastianbergmann/phpunit)
|
||||
|
||||
## 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:
|
||||
|
||||
```bash
|
||||
$ wget https://phar.phpunit.de/phpunit.phar
|
||||
$ wget https://phar.phpunit.de/phpunit-X.Y.phar
|
||||
|
||||
$ chmod +x phpunit.phar
|
||||
|
||||
$ mv phpunit.phar /usr/local/bin/phpunit
|
||||
$ php phpunit-X.Y.phar --version
|
||||
```
|
||||
|
||||
You can also immediately use the PHAR after you have downloaded it, of course:
|
||||
Please replace `X.Y` with the version of PHPUnit you are interested in.
|
||||
|
||||
```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 +32,14 @@ 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)
|
||||
|
||||
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)
|
||||
|
||||
|
||||
11
vendor/phpunit/phpunit/SECURITY.md
vendored
Normal file
11
vendor/phpunit/phpunit/SECURITY.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# Security Policy
|
||||
|
||||
PHPUnit is a framework for writing as well as a commandline tool for running tests. Writing and running tests is a development-time activity. There is no reason why PHPUnit should be installed on a webserver.
|
||||
|
||||
**If you upload PHPUnit to a webserver then your deployment process is broken. On a more general note, if your `vendor` directory is publicly accessible on your webserver then your deployment process is also broken.**
|
||||
|
||||
Please note that if you upload PHPUnit to a webserver "bad things" may happen. [You have been warned.](https://thephp.cc/articles/phpunit-a-security-risk)
|
||||
|
||||
## Security Contact Information
|
||||
|
||||
After the above, if you still would like to report a security vulnerability, please email `sebastian@phpunit.de`.
|
||||
420
vendor/phpunit/phpunit/build.xml
vendored
420
vendor/phpunit/phpunit/build.xml
vendored
@@ -1,420 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="phpunit" default="setup">
|
||||
<target name="setup" depends="clean,install-dependencies"/>
|
||||
<target name="validate" depends="php-syntax-check,validate-composer-json,validate-phpunit-xsd"/>
|
||||
|
||||
<target name="clean" unless="clean.done" description="Cleanup build artifacts">
|
||||
<delete dir="${basedir}/bin"/>
|
||||
<delete dir="${basedir}/vendor"/>
|
||||
<delete file="${basedir}/composer.lock"/>
|
||||
<delete dir="${basedir}/build/documentation"/>
|
||||
<delete dir="${basedir}/build/logfiles"/>
|
||||
<delete dir="${basedir}/build/phar"/>
|
||||
<delete>
|
||||
<fileset dir="${basedir}/build">
|
||||
<include name="**/phpunit*.phar"/>
|
||||
<include name="**/phpunit*.phar.asc"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
|
||||
<property name="clean.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="prepare" unless="prepare.done" depends="clean" description="Prepare for build">
|
||||
<mkdir dir="${basedir}/build/documentation"/>
|
||||
<mkdir dir="${basedir}/build/logfiles"/>
|
||||
<property name="prepare.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="validate-composer-json" 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>
|
||||
|
||||
<property name="validate-composer-json.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="-dependencies-installed">
|
||||
<available file="${basedir}/composer.lock" property="dependencies-installed"/>
|
||||
</target>
|
||||
|
||||
<target name="install-dependencies" unless="dependencies-installed" depends="-dependencies-installed,validate-composer-json" description="Install dependencies with Composer">
|
||||
<exec executable="${basedir}/build/tools/composer" taskname="composer">
|
||||
<arg value="update"/>
|
||||
<arg value="--no-interaction"/>
|
||||
<arg value="--no-progress"/>
|
||||
<arg value="--no-ansi"/>
|
||||
<arg value="--no-suggest"/>
|
||||
<arg value="--optimize-autoloader"/>
|
||||
<arg value="--prefer-stable"/>
|
||||
</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"/>
|
||||
|
||||
<fileset dir="${basedir}/src">
|
||||
<include name="**/*.php"/>
|
||||
<modified/>
|
||||
</fileset>
|
||||
|
||||
<fileset dir="${basedir}/tests">
|
||||
<include name="**/*.php"/>
|
||||
<modified/>
|
||||
</fileset>
|
||||
</apply>
|
||||
|
||||
<property name="php-syntax-check.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="validate-phpunit-xsd" unless="validate-phpunit-xsd.done" description="Validate phpunit.xsd">
|
||||
<exec executable="xmllint" failonerror="true" taskname="xmllint">
|
||||
<arg value="--noout"/>
|
||||
<arg path="${basedir}/phpunit.xsd"/>
|
||||
</exec>
|
||||
|
||||
<property name="validate-phpunit-xsd.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="test" depends="validate,install-dependencies" description="Run tests">
|
||||
<exec executable="${basedir}/phpunit" taskname="phpunit"/>
|
||||
</target>
|
||||
|
||||
<target name="signed-phar" depends="phar" description="Create signed PHAR archive of PHPUnit and all its dependencies">
|
||||
<exec executable="gpg" failonerror="true">
|
||||
<arg value="--local-user"/>
|
||||
<arg value="sb@sebastian-bergmann.de"/>
|
||||
<arg value="--armor"/>
|
||||
<arg value="--detach-sign"/>
|
||||
<arg path="${basedir}/build/phpunit-library-${version}.phar"/>
|
||||
</exec>
|
||||
|
||||
<exec executable="gpg" failonerror="true">
|
||||
<arg value="--local-user"/>
|
||||
<arg value="sb@sebastian-bergmann.de"/>
|
||||
<arg value="--armor"/>
|
||||
<arg value="--detach-sign"/>
|
||||
<arg path="${basedir}/build/phpunit-${version}.phar"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="phar" depends="-phar-determine-version,-phar-prepare" description="Create PHAR archive of PHPUnit and all its dependencies">
|
||||
<antcall target="-phar-build">
|
||||
<param name="type" value="release"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="phar-nightly" depends="-phar-prepare" description="Create PHAR archive of PHPUnit and all its dependencies (nightly)">
|
||||
<antcall target="-phar-build">
|
||||
<param name="type" value="nightly"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="-phar-prepare" depends="clean,install-dependencies">
|
||||
<mkdir dir="${basedir}/build/phar"/>
|
||||
<copy file="${basedir}/composer.json" tofile="${basedir}/composer.json.bak"/>
|
||||
|
||||
<exec executable="${basedir}/build/tools/composer">
|
||||
<arg value="require"/>
|
||||
<arg value="phpunit/dbunit:~2.0"/>
|
||||
<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" />
|
||||
|
||||
<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">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-code-coverage/src">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpunit/php-file-iterator/LICENSE" tofile="${basedir}/build/phar/php-file-iterator/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/php-file-iterator">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-file-iterator/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpunit/php-text-template/LICENSE" tofile="${basedir}/build/phar/php-text-template/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/php-text-template">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-text-template/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpunit/php-timer/LICENSE" tofile="${basedir}/build/phar/php-timer/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/php-timer">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-timer/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpunit/php-token-stream/LICENSE" tofile="${basedir}/build/phar/php-token-stream/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/php-token-stream">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-token-stream/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpunit/phpunit-mock-objects/LICENSE" tofile="${basedir}/build/phar/phpunit-mock-objects/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/phpunit-mock-objects">
|
||||
<fileset dir="${basedir}/vendor/phpunit/phpunit-mock-objects/src">
|
||||
<include name="**/*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/code-unit-reverse-lookup/LICENSE" tofile="${basedir}/build/phar/sebastian-code-unit-reverse-lookup/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-code-unit-reverse-lookup">
|
||||
<fileset dir="${basedir}/vendor/sebastian/code-unit-reverse-lookup/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/comparator/LICENSE" tofile="${basedir}/build/phar/sebastian-comparator/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-comparator">
|
||||
<fileset dir="${basedir}/vendor/sebastian/comparator/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/diff/LICENSE" tofile="${basedir}/build/phar/sebastian-diff/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-diff">
|
||||
<fileset dir="${basedir}/vendor/sebastian/diff/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/environment/LICENSE" tofile="${basedir}/build/phar/sebastian-environment/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-environment">
|
||||
<fileset dir="${basedir}/vendor/sebastian/environment/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/exporter/LICENSE" tofile="${basedir}/build/phar/sebastian-exporter/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-exporter">
|
||||
<fileset dir="${basedir}/vendor/sebastian/exporter/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/recursion-context/LICENSE" tofile="${basedir}/build/phar/sebastian-recursion-context/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-recursion-context">
|
||||
<fileset dir="${basedir}/vendor/sebastian/recursion-context/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/resource-operations/LICENSE" tofile="${basedir}/build/phar/sebastian-resource-operations/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-resource-operations">
|
||||
<fileset dir="${basedir}/vendor/sebastian/resource-operations/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/global-state/LICENSE" tofile="${basedir}/build/phar/sebastian-global-state/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-global-state">
|
||||
<fileset dir="${basedir}/vendor/sebastian/global-state/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/object-enumerator/LICENSE" tofile="${basedir}/build/phar/object-enumerator/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-object-enumerator">
|
||||
<fileset dir="${basedir}/vendor/sebastian/object-enumerator/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/sebastian/version/LICENSE" tofile="${basedir}/build/phar/sebastian-version/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/sebastian-version">
|
||||
<fileset dir="${basedir}/vendor/sebastian/version/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/doctrine/instantiator/LICENSE" tofile="${basedir}/build/phar/doctrine-instantiator/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/doctrine-instantiator">
|
||||
<fileset dir="${basedir}/vendor/doctrine/instantiator/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/symfony/yaml/LICENSE" tofile="${basedir}/build/phar/symfony/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/symfony">
|
||||
<fileset dir="${basedir}/vendor/symfony">
|
||||
<include name="**/*.php" />
|
||||
<exclude name="**/Command/*.php" />
|
||||
<exclude name="**/Tests/**" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${basedir}/build/phar/dbunit">
|
||||
<fileset dir="${basedir}/vendor/phpunit/dbunit/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${basedir}/build/phar/php-invoker">
|
||||
<fileset dir="${basedir}/vendor/phpunit/php-invoker/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpdocumentor/reflection-common/LICENSE" tofile="${basedir}/build/phar/phpdocumentor-reflection-common/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/phpdocumentor-reflection-common">
|
||||
<fileset dir="${basedir}/vendor/phpdocumentor/reflection-common/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpdocumentor/reflection-docblock/LICENSE" tofile="${basedir}/build/phar/phpdocumentor-reflection-docblock/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/phpdocumentor-reflection-docblock">
|
||||
<fileset dir="${basedir}/vendor/phpdocumentor/reflection-docblock/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpdocumentor/type-resolver/LICENSE" tofile="${basedir}/build/phar/phpdocumentor-type-resolver/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/phpdocumentor-type-resolver">
|
||||
<fileset dir="${basedir}/vendor/phpdocumentor/type-resolver/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/phpspec/prophecy/LICENSE" tofile="${basedir}/build/phar/phpspec-prophecy/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/phpspec-prophecy">
|
||||
<fileset dir="${basedir}/vendor/phpspec/prophecy/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/myclabs/deep-copy/LICENSE" tofile="${basedir}/build/phar/myclabs-deep-copy/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/myclabs-deep-copy">
|
||||
<fileset dir="${basedir}/vendor/myclabs/deep-copy/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy file="${basedir}/vendor/webmozart/assert/LICENSE" tofile="${basedir}/build/phar/webmozart-assert/LICENSE"/>
|
||||
<copy todir="${basedir}/build/phar/webmozart-assert">
|
||||
<fileset dir="${basedir}/vendor/webmozart/assert/src">
|
||||
<include name="**/*.php" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="-phar-build" depends="-phar-determine-version">
|
||||
<copy todir="${basedir}/build/phar/phpunit">
|
||||
<fileset dir="${basedir}/src">
|
||||
<include name="**/*.php"/>
|
||||
<include name="**/*.tpl*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<exec executable="${basedir}/build/phar-version.php" outputproperty="_version">
|
||||
<arg value="${version}"/>
|
||||
<arg value="${type}"/>
|
||||
</exec>
|
||||
|
||||
<exec executable="${basedir}/build/tools/phpab" taskname="phpab">
|
||||
<arg value="--all" />
|
||||
<arg value="--static" />
|
||||
<arg value="--once" />
|
||||
<arg value="--phar" />
|
||||
<arg value="--hash" />
|
||||
<arg value="SHA-1" />
|
||||
<arg value="--output" />
|
||||
<arg path="${basedir}/build/phpunit-library-${_version}.phar" />
|
||||
<arg value="--template" />
|
||||
<arg path="${basedir}/build/library-phar-autoload.php.in" />
|
||||
<arg path="${basedir}/build/phar" />
|
||||
</exec>
|
||||
|
||||
<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">
|
||||
<arg value="--all" />
|
||||
<arg value="--nolower" />
|
||||
<arg value="--static" />
|
||||
<arg value="--phar" />
|
||||
<arg value="--hash" />
|
||||
<arg value="SHA-1" />
|
||||
<arg value="--output" />
|
||||
<arg path="${basedir}/build/phpunit-${_version}.phar" />
|
||||
<arg value="--template" />
|
||||
<arg path="${basedir}/build/binary-phar-autoload.php" />
|
||||
<arg path="${basedir}/build/phar" />
|
||||
</exec>
|
||||
|
||||
<chmod file="${basedir}/build/phpunit-${_version}.phar" perm="ugo+rx"/>
|
||||
|
||||
<delete dir="${basedir}/build/phar"/>
|
||||
<delete file="${basedir}/build/binary-phar-autoload.php"/>
|
||||
</target>
|
||||
|
||||
<target name="-phar-determine-version">
|
||||
<exec executable="${basedir}/build/version.php" outputproperty="version" />
|
||||
</target>
|
||||
|
||||
<target name="generate-project-documentation" depends="-phploc,-phpcs,-phpmd,-phpunit">
|
||||
<exec executable="${basedir}/build/tools/phpdox" dir="${basedir}/build" taskname="phpdox"/>
|
||||
</target>
|
||||
|
||||
<target name="-phploc" depends="prepare">
|
||||
<exec executable="${basedir}/build/tools/phploc" output="/dev/null" taskname="phploc">
|
||||
<arg value="--count-tests"/>
|
||||
<arg value="--log-xml"/>
|
||||
<arg path="${basedir}/build/logfiles/phploc.xml"/>
|
||||
<arg path="${basedir}/src"/>
|
||||
<arg path="${basedir}/tests"/>
|
||||
</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"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="-phpunit" depends="setup">
|
||||
<exec executable="${basedir}/phpunit" taskname="phpunit">
|
||||
<arg value="--coverage-xml"/>
|
||||
<arg path="${basedir}/build/logfiles/coverage"/>
|
||||
<arg value="--log-junit"/>
|
||||
<arg path="${basedir}/build/logfiles/junit.xml"/>
|
||||
</exec>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
66
vendor/phpunit/phpunit/composer.json
vendored
66
vendor/phpunit/phpunit/composer.json
vendored
@@ -19,43 +19,45 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues"
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": "^5.6 || ^7.0",
|
||||
"phpunit/php-file-iterator": "~1.4",
|
||||
"phpunit/php-text-template": "~1.2",
|
||||
"phpunit/php-code-coverage": "^4.0.4",
|
||||
"phpunit/php-timer": "^1.0.6",
|
||||
"phpunit/phpunit-mock-objects": "^3.2",
|
||||
"phpspec/prophecy": "^1.6.2",
|
||||
"symfony/yaml": "~2.1|~3.0",
|
||||
"sebastian/comparator": "^1.2.4",
|
||||
"sebastian/diff": "^1.4.3",
|
||||
"sebastian/environment": "^1.3.4 || ^2.0",
|
||||
"sebastian/exporter": "~2.0",
|
||||
"sebastian/global-state": "^1.1",
|
||||
"sebastian/object-enumerator": "~2.0",
|
||||
"sebastian/resource-operations": "~1.0",
|
||||
"sebastian/version": "~1.0.3|~2.0",
|
||||
"myclabs/deep-copy": "~1.3",
|
||||
"php": ">=7.3",
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-libxml": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-PDO": "*"
|
||||
},
|
||||
"conflict": {
|
||||
"phpdocumentor/reflection-docblock": "3.0.2"
|
||||
"ext-xmlwriter": "*",
|
||||
"doctrine/instantiator": "^1.3.1",
|
||||
"myclabs/deep-copy": "^1.10.1",
|
||||
"phar-io/manifest": "^2.0.3",
|
||||
"phar-io/version": "^3.0.2",
|
||||
"phpunit/php-code-coverage": "^9.2.13",
|
||||
"phpunit/php-file-iterator": "^3.0.5",
|
||||
"phpunit/php-invoker": "^3.1.1",
|
||||
"phpunit/php-text-template": "^2.0.3",
|
||||
"phpunit/php-timer": "^5.0.2",
|
||||
"sebastian/cli-parser": "^1.0.1",
|
||||
"sebastian/code-unit": "^1.0.6",
|
||||
"sebastian/comparator": "^4.0.8",
|
||||
"sebastian/diff": "^4.0.3",
|
||||
"sebastian/environment": "^5.1.3",
|
||||
"sebastian/exporter": "^4.0.5",
|
||||
"sebastian/global-state": "^5.0.1",
|
||||
"sebastian/object-enumerator": "^4.0.3",
|
||||
"sebastian/resource-operations": "^3.0.3",
|
||||
"sebastian/type": "^3.2",
|
||||
"sebastian/version": "^3.0.2"
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.6.0"
|
||||
}
|
||||
"php": "7.3.0"
|
||||
},
|
||||
"optimize-autoloader": true,
|
||||
"sort-packages": true
|
||||
},
|
||||
"suggest": {
|
||||
"phpunit/php-invoker": "~1.1",
|
||||
"ext-soap": "*",
|
||||
"ext-xdebug": "*"
|
||||
},
|
||||
"bin": [
|
||||
@@ -64,6 +66,9 @@
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
],
|
||||
"files": [
|
||||
"src/Framework/Assert/Functions.php"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
@@ -71,13 +76,14 @@
|
||||
"tests/"
|
||||
],
|
||||
"files": [
|
||||
"src/Framework/Assert/Functions.php",
|
||||
"tests/_files/CoveredFunction.php"
|
||||
"tests/_files/CoverageNamespacedFunctionTest.php",
|
||||
"tests/_files/CoveredFunction.php",
|
||||
"tests/_files/NamespaceCoveredFunction.php"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.7.x-dev"
|
||||
"dev-master": "9.5-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
68
vendor/phpunit/phpunit/phpunit
vendored
68
vendor/phpunit/phpunit/phpunit
vendored
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -9,11 +9,26 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
if (version_compare('5.6.0', PHP_VERSION, '>')) {
|
||||
if (!version_compare(PHP_VERSION, PHP_VERSION, '=')) {
|
||||
fwrite(
|
||||
STDERR,
|
||||
sprintf(
|
||||
'This version of PHPUnit is supported on PHP 5.6, PHP 7.0, and PHP 7.1.' . PHP_EOL .
|
||||
'%s declares an invalid value for PHP_VERSION.' . PHP_EOL .
|
||||
'This breaks fundamental functionality such as version_compare().' . PHP_EOL .
|
||||
'Please use a different PHP interpreter.' . PHP_EOL,
|
||||
|
||||
PHP_BINARY
|
||||
)
|
||||
);
|
||||
|
||||
die(1);
|
||||
}
|
||||
|
||||
if (version_compare('7.3.0', PHP_VERSION, '>')) {
|
||||
fwrite(
|
||||
STDERR,
|
||||
sprintf(
|
||||
'This version of PHPUnit requires PHP >= 7.3.' . PHP_EOL .
|
||||
'You are using PHP %s (%s).' . PHP_EOL,
|
||||
PHP_VERSION,
|
||||
PHP_BINARY
|
||||
@@ -23,22 +38,45 @@ if (version_compare('5.6.0', PHP_VERSION, '>')) {
|
||||
die(1);
|
||||
}
|
||||
|
||||
foreach (['dom', 'json', 'libxml', 'mbstring', 'tokenizer', 'xml', 'xmlwriter'] as $extension) {
|
||||
if (extension_loaded($extension)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
fwrite(
|
||||
STDERR,
|
||||
sprintf(
|
||||
'PHPUnit requires the "%s" extension.' . PHP_EOL,
|
||||
$extension
|
||||
)
|
||||
);
|
||||
|
||||
die(1);
|
||||
}
|
||||
|
||||
if (!ini_get('date.timezone')) {
|
||||
ini_set('date.timezone', 'UTC');
|
||||
}
|
||||
|
||||
foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
|
||||
if (file_exists($file)) {
|
||||
define('PHPUNIT_COMPOSER_INSTALL', $file);
|
||||
if (isset($GLOBALS['_composer_autoload_path'])) {
|
||||
define('PHPUNIT_COMPOSER_INSTALL', $GLOBALS['_composer_autoload_path']);
|
||||
|
||||
break;
|
||||
unset($GLOBALS['_composer_autoload_path']);
|
||||
} else {
|
||||
foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
|
||||
if (file_exists($file)) {
|
||||
define('PHPUNIT_COMPOSER_INSTALL', $file);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
unset($file);
|
||||
}
|
||||
|
||||
unset($file);
|
||||
|
||||
if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
|
||||
fwrite(STDERR,
|
||||
fwrite(
|
||||
STDERR,
|
||||
'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL .
|
||||
' composer install' . PHP_EOL . PHP_EOL .
|
||||
'You can learn all about Composer on https://getcomposer.org/.' . PHP_EOL
|
||||
@@ -47,6 +85,14 @@ if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
|
||||
die(1);
|
||||
}
|
||||
|
||||
$options = getopt('', array('prepend:'));
|
||||
|
||||
if (isset($options['prepend'])) {
|
||||
require $options['prepend'];
|
||||
}
|
||||
|
||||
unset($options);
|
||||
|
||||
require PHPUNIT_COMPOSER_INSTALL;
|
||||
|
||||
PHPUnit_TextUI_Command::main();
|
||||
PHPUnit\TextUI\Command::main();
|
||||
|
||||
34
vendor/phpunit/phpunit/phpunit.xml
vendored
34
vendor/phpunit/phpunit/phpunit.xml
vendored
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="phpunit.xsd"
|
||||
bootstrap="tests/bootstrap.php"
|
||||
backupGlobals="false"
|
||||
verbose="true">
|
||||
<testsuites>
|
||||
<testsuite name="small">
|
||||
<directory suffix="Test.php">tests/Framework</directory>
|
||||
<directory suffix="Test.php">tests/Extensions</directory>
|
||||
<directory suffix="Test.php">tests/Runner</directory>
|
||||
<directory suffix="Test.php">tests/Util</directory>
|
||||
</testsuite>
|
||||
|
||||
<testsuite name="large">
|
||||
<directory suffix=".phpt">tests/TextUI</directory>
|
||||
<directory suffix=".phpt">tests/Regression</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">src</directory>
|
||||
<exclude>
|
||||
<file>src/Framework/Assert/Functions.php</file>
|
||||
<file>src/Util/PHP/eval-stdin.php</file>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
|
||||
<php>
|
||||
<const name="PHPUNIT_TESTSUITE" value="true"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
570
vendor/phpunit/phpunit/phpunit.xsd
vendored
570
vendor/phpunit/phpunit/phpunit.xsd
vendored
@@ -1,254 +1,330 @@
|
||||
<?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/5.7/en/appendixes.configuration.html">
|
||||
This Schema file defines the rules by which the XML configuration file of PHPUnit 5.7 may be structured.
|
||||
</xs:documentation>
|
||||
<xs:appinfo source="http://www.phpunit.de/manual/current/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/documentation.html">
|
||||
This Schema file defines the rules by which the XML configuration file of PHPUnit 9.5 may be structured.
|
||||
</xs:documentation>
|
||||
<xs:appinfo source="https://phpunit.de/documentation.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: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:element name="phpunit" type="phpUnitType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Root Element</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:complexType name="coverageType">
|
||||
<xs:all>
|
||||
<xs:element name="include" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:group ref="pathGroup"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="exclude" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:group ref="pathGroup"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="report" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:group ref="coverageReportGroup"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="cacheDirectory" type="xs:anyURI"/>
|
||||
<xs:attribute name="pathCoverage" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="includeUncoveredFiles" type="xs:boolean" default="true"/>
|
||||
<xs:attribute name="processUncoveredFiles" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="ignoreDeprecatedCodeUnits" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="disableCodeCoverageIgnore" type="xs:boolean" default="false"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="loggingType">
|
||||
<xs:group ref="loggingGroup"/>
|
||||
</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="extensionsType">
|
||||
<xs:sequence>
|
||||
<xs:element name="extension" type="objectType" 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:element name="boolean" type="xs:boolean" 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: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:string">
|
||||
<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:simpleType name="executionOrderType">
|
||||
<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:enumeration value="default"/>
|
||||
<xs:enumeration value="defects"/>
|
||||
<xs:enumeration value="depends"/>
|
||||
<xs:enumeration value="depends,defects"/>
|
||||
<xs:enumeration value="depends,duration"/>
|
||||
<xs:enumeration value="depends,random"/>
|
||||
<xs:enumeration value="depends,reverse"/>
|
||||
<xs:enumeration value="depends,size"/>
|
||||
<xs:enumeration value="duration"/>
|
||||
<xs:enumeration value="no-depends"/>
|
||||
<xs:enumeration value="no-depends,defects"/>
|
||||
<xs:enumeration value="no-depends,duration"/>
|
||||
<xs:enumeration value="no-depends,random"/>
|
||||
<xs:enumeration value="no-depends,reverse"/>
|
||||
<xs:enumeration value="no-depends,size"/>
|
||||
<xs:enumeration value="random"/>
|
||||
<xs:enumeration value="reverse"/>
|
||||
<xs:enumeration value="size"/>
|
||||
</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="logIncompleteSkipped" type="xs:boolean" default="false"/>
|
||||
<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=">="/>
|
||||
</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: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="true"/>
|
||||
<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="xs:integer" default="80"/>
|
||||
<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="false"/>
|
||||
<xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="beStrictAboutCoversAnnotation" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="checkForUnintentionallyCoveredCode" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="enforceTimeLimit" 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="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:simpleType>
|
||||
<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=">="/>
|
||||
</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="cacheResult" type="xs:boolean" default="true"/>
|
||||
<xs:attribute name="cacheResultFile" type="xs:anyURI"/>
|
||||
<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="false"/>
|
||||
<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\DefaultResultPrinter"/>
|
||||
<xs:attribute name="printerFile" type="xs:anyURI"/>
|
||||
<xs:attribute name="processIsolation" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="stopOnDefect" 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="failOnEmptyTestSuite" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="failOnIncomplete" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="failOnRisky" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="failOnSkipped" 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="defaultTimeLimit" type="xs:integer" default="0"/>
|
||||
<xs:attribute name="enforceTimeLimit" 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="testdox" 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:anyURI"/>
|
||||
<xs:attribute name="executionOrder" type="executionOrderType" default="default"/>
|
||||
<xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/>
|
||||
<xs:attribute name="noInteraction" type="xs:boolean" default="false"/>
|
||||
</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="coverage" type="coverageType" minOccurs="0"/>
|
||||
<xs:element name="logging" type="loggingType" minOccurs="0"/>
|
||||
<xs:element name="extensions" type="extensionsType" 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:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:group ref="pathGroup"/>
|
||||
<xs:element name="exclude" type="xs:string"/>
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="name" type="xs:string" use="required"/>
|
||||
</xs:complexType>
|
||||
<xs:group name="coverageReportGroup">
|
||||
<xs:all>
|
||||
<xs:element name="clover" type="logToFileType" minOccurs="0"/>
|
||||
<xs:element name="cobertura" type="logToFileType" minOccurs="0"/>
|
||||
<xs:element name="crap4j" type="coverageReportCrap4JType" minOccurs="0" />
|
||||
<xs:element name="html" type="coverageReportHtmlType" minOccurs="0" />
|
||||
<xs:element name="php" type="logToFileType" minOccurs="0" />
|
||||
<xs:element name="text" type="coverageReportTextType" minOccurs="0" />
|
||||
<xs:element name="xml" type="logToDirectoryType" minOccurs="0" />
|
||||
</xs:all>
|
||||
</xs:group>
|
||||
<xs:group name="loggingGroup">
|
||||
<xs:all>
|
||||
<xs:element name="junit" type="logToFileType" minOccurs="0" />
|
||||
<xs:element name="teamcity" type="logToFileType" minOccurs="0" />
|
||||
<xs:element name="testdoxHtml" type="logToFileType" minOccurs="0" />
|
||||
<xs:element name="testdoxText" type="logToFileType" minOccurs="0" />
|
||||
<xs:element name="testdoxXml" type="logToFileType" minOccurs="0" />
|
||||
<xs:element name="text" type="logToFileType" minOccurs="0"/>
|
||||
</xs:all>
|
||||
</xs:group>
|
||||
<xs:complexType name="logToFileType">
|
||||
<xs:attribute name="outputFile" type="xs:anyURI" use="required"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="logToDirectoryType">
|
||||
<xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="coverageReportCrap4JType">
|
||||
<xs:attribute name="outputFile" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name="threshold" type="xs:integer"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="coverageReportHtmlType">
|
||||
<xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name="lowUpperBound" type="xs:integer" default="50"/>
|
||||
<xs:attribute name="highLowerBound" type="xs:integer" default="90"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="coverageReportTextType">
|
||||
<xs:attribute name="outputFile" type="xs:anyURI" use="required"/>
|
||||
<xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="showOnlySummary" type="xs:boolean" default="false"/>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
|
||||
317
vendor/phpunit/phpunit/schema/8.5.xsd
vendored
Normal file
317
vendor/phpunit/phpunit/schema/8.5.xsd
vendored
Normal file
@@ -0,0 +1,317 @@
|
||||
<?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/documentation.html">
|
||||
This Schema file defines the rules by which the XML configuration file of PHPUnit 8.5 may be structured.
|
||||
</xs:documentation>
|
||||
<xs:appinfo source="https://phpunit.de/documentation.html"/>
|
||||
</xs:annotation>
|
||||
<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="extensionsType">
|
||||
<xs:sequence>
|
||||
<xs:element name="extension" type="objectType" 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:element name="boolean" type="xs:boolean" 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="50"/>
|
||||
<xs:attribute name="highLowerBound" type="xs:nonNegativeInteger" default="90"/>
|
||||
<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:string">
|
||||
<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:simpleType name="executionOrderType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="default"/>
|
||||
<xs:enumeration value="defects"/>
|
||||
<xs:enumeration value="depends"/>
|
||||
<xs:enumeration value="depends,defects"/>
|
||||
<xs:enumeration value="depends,duration"/>
|
||||
<xs:enumeration value="depends,random"/>
|
||||
<xs:enumeration value="depends,reverse"/>
|
||||
<xs:enumeration value="depends,size"/>
|
||||
<xs:enumeration value="duration"/>
|
||||
<xs:enumeration value="no-depends"/>
|
||||
<xs:enumeration value="no-depends,defects"/>
|
||||
<xs:enumeration value="no-depends,duration"/>
|
||||
<xs:enumeration value="no-depends,random"/>
|
||||
<xs:enumeration value="no-depends,reverse"/>
|
||||
<xs:enumeration value="no-depends,size"/>
|
||||
<xs:enumeration value="random"/>
|
||||
<xs:enumeration value="reverse"/>
|
||||
<xs:enumeration value="size"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<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=">="/>
|
||||
</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="cacheResult" type="xs:boolean" default="true"/>
|
||||
<xs:attribute name="cacheResultFile" type="xs:anyURI"/>
|
||||
<xs:attribute name="cacheTokens" type="xs:boolean" default="false"/>
|
||||
<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="disableCodeCoverageIgnore" type="xs:boolean" default="false"/>
|
||||
<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="stopOnDefect" 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="defaultTimeLimit" type="xs:integer" default="0"/>
|
||||
<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="testdox" 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:anyURI"/>
|
||||
<xs:attribute name="executionOrder" type="executionOrderType" default="default"/>
|
||||
<xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/>
|
||||
<xs:attribute name="noInteraction" type="xs:boolean" default="false"/>
|
||||
</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="extensions" type="extensionsType" 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:string" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="name" type="xs:string" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
317
vendor/phpunit/phpunit/schema/9.2.xsd
vendored
Normal file
317
vendor/phpunit/phpunit/schema/9.2.xsd
vendored
Normal file
@@ -0,0 +1,317 @@
|
||||
<?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/documentation.html">
|
||||
This Schema file defines the rules by which the XML configuration file of PHPUnit 9.2 may be structured.
|
||||
</xs:documentation>
|
||||
<xs:appinfo source="https://phpunit.de/documentation.html"/>
|
||||
</xs:annotation>
|
||||
<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="extensionsType">
|
||||
<xs:sequence>
|
||||
<xs:element name="extension" type="objectType" 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:element name="boolean" type="xs:boolean" 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="plain"/>
|
||||
<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="50"/>
|
||||
<xs:attribute name="highLowerBound" type="xs:nonNegativeInteger" default="90"/>
|
||||
<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:string">
|
||||
<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:simpleType name="executionOrderType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="default"/>
|
||||
<xs:enumeration value="defects"/>
|
||||
<xs:enumeration value="depends"/>
|
||||
<xs:enumeration value="depends,defects"/>
|
||||
<xs:enumeration value="depends,duration"/>
|
||||
<xs:enumeration value="depends,random"/>
|
||||
<xs:enumeration value="depends,reverse"/>
|
||||
<xs:enumeration value="depends,size"/>
|
||||
<xs:enumeration value="duration"/>
|
||||
<xs:enumeration value="no-depends"/>
|
||||
<xs:enumeration value="no-depends,defects"/>
|
||||
<xs:enumeration value="no-depends,duration"/>
|
||||
<xs:enumeration value="no-depends,random"/>
|
||||
<xs:enumeration value="no-depends,reverse"/>
|
||||
<xs:enumeration value="no-depends,size"/>
|
||||
<xs:enumeration value="random"/>
|
||||
<xs:enumeration value="reverse"/>
|
||||
<xs:enumeration value="size"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<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=">="/>
|
||||
</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="cacheResult" type="xs:boolean" default="true"/>
|
||||
<xs:attribute name="cacheResultFile" type="xs:anyURI"/>
|
||||
<xs:attribute name="cacheTokens" type="xs:boolean" default="false"/>
|
||||
<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="disableCodeCoverageIgnore" type="xs:boolean" default="false"/>
|
||||
<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="stopOnDefect" 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="failOnIncomplete" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="failOnRisky" type="xs:boolean" default="false"/>
|
||||
<xs:attribute name="failOnSkipped" 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="defaultTimeLimit" type="xs:integer" default="0"/>
|
||||
<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="testdox" 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:anyURI"/>
|
||||
<xs:attribute name="executionOrder" type="executionOrderType" default="default"/>
|
||||
<xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/>
|
||||
<xs:attribute name="noInteraction" type="xs:boolean" default="false"/>
|
||||
</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="extensions" type="extensionsType" 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:string" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="name" type="xs:string" use="required"/>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
9
vendor/phpunit/phpunit/src/Exception.php
vendored
9
vendor/phpunit/phpunit/src/Exception.php
vendored
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,10 +7,13 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit;
|
||||
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Marker interface for PHPUnit exceptions.
|
||||
* @internal This class is not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
interface PHPUnit_Exception
|
||||
interface Exception extends Throwable
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,58 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* We have a TestSuite object A.
|
||||
* In TestSuite object A we have Tests tagged with @group.
|
||||
* We want a TestSuite object B that contains TestSuite objects C, D, ...
|
||||
* for the Tests tagged with @group C, @group D, ...
|
||||
* Running the Tests from TestSuite object B results in Tests tagged with both
|
||||
*
|
||||
* @group C and @group D in TestSuite object A to be run twice .
|
||||
*
|
||||
* <code>
|
||||
* $suite = new PHPUnit_Extensions_GroupTestSuite($A, array('C', 'D'));
|
||||
* </code>
|
||||
*/
|
||||
class PHPUnit_Extensions_GroupTestSuite extends PHPUnit_Framework_TestSuite
|
||||
{
|
||||
public function __construct(PHPUnit_Framework_TestSuite $suite, array $groups)
|
||||
{
|
||||
$groupSuites = [];
|
||||
$name = $suite->getName();
|
||||
|
||||
foreach ($groups as $group) {
|
||||
$groupSuites[$group] = new PHPUnit_Framework_TestSuite($name . ' - ' . $group);
|
||||
$this->addTest($groupSuites[$group]);
|
||||
}
|
||||
|
||||
$tests = new RecursiveIteratorIterator(
|
||||
new PHPUnit_Util_TestSuiteIterator($suite),
|
||||
RecursiveIteratorIterator::LEAVES_ONLY
|
||||
);
|
||||
|
||||
foreach ($tests as $test) {
|
||||
if ($test instanceof PHPUnit_Framework_TestCase) {
|
||||
$testGroups = PHPUnit_Util_Test::getGroups(
|
||||
get_class($test),
|
||||
$test->getName(false)
|
||||
);
|
||||
|
||||
foreach ($groups as $group) {
|
||||
foreach ($testGroups as $testGroup) {
|
||||
if ($group == $testGroup) {
|
||||
$groupSuites[$group]->addTest($test);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,430 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Runner for PHPT test cases.
|
||||
*/
|
||||
class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit_Framework_SelfDescribing
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $filename;
|
||||
|
||||
/**
|
||||
* @var PHPUnit_Util_PHP
|
||||
*/
|
||||
private $phpUtil;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $settings = [
|
||||
'allow_url_fopen=1',
|
||||
'auto_append_file=',
|
||||
'auto_prepend_file=',
|
||||
'disable_functions=',
|
||||
'display_errors=1',
|
||||
'docref_root=',
|
||||
'docref_ext=.html',
|
||||
'error_append_string=',
|
||||
'error_prepend_string=',
|
||||
'error_reporting=-1',
|
||||
'html_errors=0',
|
||||
'log_errors=0',
|
||||
'magic_quotes_runtime=0',
|
||||
'output_handler=',
|
||||
'open_basedir=',
|
||||
'output_buffering=Off',
|
||||
'report_memleaks=0',
|
||||
'report_zend_debug=0',
|
||||
'safe_mode=0',
|
||||
'xdebug.default_enable=0'
|
||||
];
|
||||
|
||||
/**
|
||||
* Constructs a test case with the given filename.
|
||||
*
|
||||
* @param string $filename
|
||||
* @param PHPUnit_Util_PHP $phpUtil
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($filename, $phpUtil = null)
|
||||
{
|
||||
if (!is_string($filename)) {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
|
||||
}
|
||||
|
||||
if (!is_file($filename)) {
|
||||
throw new PHPUnit_Framework_Exception(
|
||||
sprintf(
|
||||
'File "%s" does not exist.',
|
||||
$filename
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$this->filename = $filename;
|
||||
$this->phpUtil = $phpUtil ?: PHPUnit_Util_PHP::factory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of test cases executed by run(TestResult result).
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $sections
|
||||
* @param string $output
|
||||
*/
|
||||
private function assertPhptExpectation(array $sections, $output)
|
||||
{
|
||||
$assertions = [
|
||||
'EXPECT' => 'assertEquals',
|
||||
'EXPECTF' => 'assertStringMatchesFormat',
|
||||
'EXPECTREGEX' => 'assertRegExp',
|
||||
];
|
||||
|
||||
$actual = preg_replace('/\r\n/', "\n", trim($output));
|
||||
|
||||
foreach ($assertions as $sectionName => $sectionAssertion) {
|
||||
if (isset($sections[$sectionName])) {
|
||||
$sectionContent = preg_replace('/\r\n/', "\n", trim($sections[$sectionName]));
|
||||
$assertion = $sectionAssertion;
|
||||
$expected = $sectionName == 'EXPECTREGEX' ? "/{$sectionContent}/" : $sectionContent;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PHPUnit_Framework_Assert::$assertion($expected, $actual);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs a test and collects its result in a TestResult instance.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*/
|
||||
public function run(PHPUnit_Framework_TestResult $result = null)
|
||||
{
|
||||
$sections = $this->parse();
|
||||
$code = $this->render($sections['FILE']);
|
||||
|
||||
if ($result === null) {
|
||||
$result = new PHPUnit_Framework_TestResult;
|
||||
}
|
||||
|
||||
$skip = false;
|
||||
$xfail = false;
|
||||
$time = 0;
|
||||
$settings = $this->settings;
|
||||
|
||||
$result->startTest($this);
|
||||
|
||||
if (isset($sections['INI'])) {
|
||||
$settings = array_merge($settings, $this->parseIniSection($sections['INI']));
|
||||
}
|
||||
|
||||
if (isset($sections['ENV'])) {
|
||||
$env = $this->parseEnvSection($sections['ENV']);
|
||||
$this->phpUtil->setEnv($env);
|
||||
}
|
||||
|
||||
// Redirects STDERR to STDOUT
|
||||
$this->phpUtil->setUseStderrRedirection(true);
|
||||
|
||||
if ($result->enforcesTimeLimit()) {
|
||||
$this->phpUtil->setTimeout($result->getTimeoutForLargeTests());
|
||||
}
|
||||
|
||||
if (isset($sections['SKIPIF'])) {
|
||||
$jobResult = $this->phpUtil->runJob($sections['SKIPIF'], $settings);
|
||||
|
||||
if (!strncasecmp('skip', ltrim($jobResult['stdout']), 4)) {
|
||||
if (preg_match('/^\s*skip\s*(.+)\s*/i', $jobResult['stdout'], $message)) {
|
||||
$message = substr($message[1], 2);
|
||||
} else {
|
||||
$message = '';
|
||||
}
|
||||
|
||||
$result->addFailure($this, new PHPUnit_Framework_SkippedTestError($message), 0);
|
||||
|
||||
$skip = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($sections['XFAIL'])) {
|
||||
$xfail = trim($sections['XFAIL']);
|
||||
}
|
||||
|
||||
if (!$skip) {
|
||||
if (isset($sections['STDIN'])) {
|
||||
$this->phpUtil->setStdin($sections['STDIN']);
|
||||
}
|
||||
|
||||
if (isset($sections['ARGS'])) {
|
||||
$this->phpUtil->setArgs($sections['ARGS']);
|
||||
}
|
||||
|
||||
PHP_Timer::start();
|
||||
|
||||
$jobResult = $this->phpUtil->runJob($code, $settings);
|
||||
$time = PHP_Timer::stop();
|
||||
|
||||
try {
|
||||
$this->assertPhptExpectation($sections, $jobResult['stdout']);
|
||||
} catch (PHPUnit_Framework_AssertionFailedError $e) {
|
||||
if ($xfail !== false) {
|
||||
$result->addFailure(
|
||||
$this,
|
||||
new PHPUnit_Framework_IncompleteTestError(
|
||||
$xfail,
|
||||
0,
|
||||
$e
|
||||
),
|
||||
$time
|
||||
);
|
||||
} else {
|
||||
$result->addFailure($this, $e, $time);
|
||||
}
|
||||
} catch (Throwable $t) {
|
||||
$result->addError($this, $t, $time);
|
||||
} catch (Exception $e) {
|
||||
$result->addError($this, $e, $time);
|
||||
}
|
||||
|
||||
if ($result->allCompletelyImplemented() && $xfail !== false) {
|
||||
$result->addFailure(
|
||||
$this,
|
||||
new PHPUnit_Framework_IncompleteTestError(
|
||||
'XFAIL section but test passes'
|
||||
),
|
||||
$time
|
||||
);
|
||||
}
|
||||
|
||||
$this->phpUtil->setStdin('');
|
||||
$this->phpUtil->setArgs('');
|
||||
|
||||
if (isset($sections['CLEAN'])) {
|
||||
$cleanCode = $this->render($sections['CLEAN']);
|
||||
|
||||
$this->phpUtil->runJob($cleanCode, $this->settings);
|
||||
}
|
||||
}
|
||||
|
||||
$result->endTest($this, $time);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the test case.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the test case.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return $this->filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
private function parse()
|
||||
{
|
||||
$sections = [];
|
||||
$section = '';
|
||||
|
||||
$allowExternalSections = [
|
||||
'FILE',
|
||||
'EXPECT',
|
||||
'EXPECTF',
|
||||
'EXPECTREGEX'
|
||||
];
|
||||
|
||||
$requiredSections = [
|
||||
'FILE',
|
||||
[
|
||||
'EXPECT',
|
||||
'EXPECTF',
|
||||
'EXPECTREGEX'
|
||||
]
|
||||
];
|
||||
|
||||
$unsupportedSections = [
|
||||
'REDIRECTTEST',
|
||||
'REQUEST',
|
||||
'POST',
|
||||
'PUT',
|
||||
'POST_RAW',
|
||||
'GZIP_POST',
|
||||
'DEFLATE_POST',
|
||||
'GET',
|
||||
'COOKIE',
|
||||
'HEADERS',
|
||||
'CGI',
|
||||
'EXPECTHEADERS',
|
||||
'EXTENSIONS',
|
||||
'PHPDBG'
|
||||
];
|
||||
|
||||
foreach (file($this->filename) as $line) {
|
||||
if (preg_match('/^--([_A-Z]+)--/', $line, $result)) {
|
||||
$section = $result[1];
|
||||
$sections[$section] = '';
|
||||
|
||||
continue;
|
||||
} elseif (empty($section)) {
|
||||
throw new PHPUnit_Framework_Exception('Invalid PHPT file');
|
||||
}
|
||||
|
||||
$sections[$section] .= $line;
|
||||
}
|
||||
|
||||
if (isset($sections['FILEEOF'])) {
|
||||
$sections['FILE'] = rtrim($sections['FILEEOF'], "\r\n");
|
||||
unset($sections['FILEEOF']);
|
||||
}
|
||||
|
||||
$testDirectory = dirname($this->filename) . DIRECTORY_SEPARATOR;
|
||||
|
||||
foreach ($allowExternalSections as $section) {
|
||||
if (isset($sections[$section . '_EXTERNAL'])) {
|
||||
// do not allow directory traversal
|
||||
$externalFilename = str_replace('..', '', trim($sections[$section . '_EXTERNAL']));
|
||||
|
||||
// only allow files from the test directory
|
||||
if (!is_file($testDirectory . $externalFilename) || !is_readable($testDirectory . $externalFilename)) {
|
||||
throw new PHPUnit_Framework_Exception(
|
||||
sprintf(
|
||||
'Could not load --%s-- %s for PHPT file',
|
||||
$section . '_EXTERNAL',
|
||||
$testDirectory . $externalFilename
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$sections[$section] = file_get_contents($testDirectory . $externalFilename);
|
||||
|
||||
unset($sections[$section . '_EXTERNAL']);
|
||||
}
|
||||
}
|
||||
|
||||
$isValid = true;
|
||||
|
||||
foreach ($requiredSections as $section) {
|
||||
if (is_array($section)) {
|
||||
$foundSection = false;
|
||||
|
||||
foreach ($section as $anySection) {
|
||||
if (isset($sections[$anySection])) {
|
||||
$foundSection = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$foundSection) {
|
||||
$isValid = false;
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!isset($sections[$section])) {
|
||||
$isValid = false;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$isValid) {
|
||||
throw new PHPUnit_Framework_Exception('Invalid PHPT file');
|
||||
}
|
||||
|
||||
foreach ($unsupportedSections as $section) {
|
||||
if (isset($sections[$section])) {
|
||||
throw new PHPUnit_Framework_Exception(
|
||||
'PHPUnit does not support this PHPT file'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $sections;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function render($code)
|
||||
{
|
||||
return str_replace(
|
||||
[
|
||||
'__DIR__',
|
||||
'__FILE__'
|
||||
],
|
||||
[
|
||||
"'" . dirname($this->filename) . "'",
|
||||
"'" . $this->filename . "'"
|
||||
],
|
||||
$code
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse --INI-- section key value pairs and return as array.
|
||||
*
|
||||
* @param string
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function parseIniSection($content)
|
||||
{
|
||||
return preg_split('/\n|\r/', $content, -1, PREG_SPLIT_NO_EMPTY);
|
||||
}
|
||||
|
||||
protected function parseEnvSection($content)
|
||||
{
|
||||
$env = [];
|
||||
|
||||
foreach (explode("\n", trim($content)) as $e) {
|
||||
$e = explode('=', trim($e), 2);
|
||||
|
||||
if (!empty($e[0]) && isset($e[1])) {
|
||||
$env[$e[0]] = $e[1];
|
||||
}
|
||||
}
|
||||
|
||||
return $env;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Suite for .phpt test cases.
|
||||
*/
|
||||
class PHPUnit_Extensions_PhptTestSuite extends PHPUnit_Framework_TestSuite
|
||||
{
|
||||
/**
|
||||
* Constructs a new TestSuite for .phpt test cases.
|
||||
*
|
||||
* @param string $directory
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($directory)
|
||||
{
|
||||
if (is_string($directory) && is_dir($directory)) {
|
||||
$this->setName($directory);
|
||||
|
||||
$facade = new File_Iterator_Facade;
|
||||
$files = $facade->getFilesAsArray($directory, '.phpt');
|
||||
|
||||
foreach ($files as $file) {
|
||||
$this->addTestFile($file);
|
||||
}
|
||||
} else {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'directory name');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,88 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A Decorator that runs a test repeatedly.
|
||||
*/
|
||||
class PHPUnit_Extensions_RepeatedTest extends PHPUnit_Extensions_TestDecorator
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $processIsolation = false;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $timesRepeat = 1;
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param int $timesRepeat
|
||||
* @param bool $processIsolation
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct(PHPUnit_Framework_Test $test, $timesRepeat = 1, $processIsolation = false)
|
||||
{
|
||||
parent::__construct($test);
|
||||
|
||||
if (is_int($timesRepeat) &&
|
||||
$timesRepeat >= 0) {
|
||||
$this->timesRepeat = $timesRepeat;
|
||||
} else {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(
|
||||
2,
|
||||
'positive integer'
|
||||
);
|
||||
}
|
||||
|
||||
$this->processIsolation = $processIsolation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of test cases that
|
||||
* will be run by this test.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return $this->timesRepeat * count($this->test);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the decorated test and collects the
|
||||
* result in a TestResult.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function run(PHPUnit_Framework_TestResult $result = null)
|
||||
{
|
||||
if ($result === null) {
|
||||
$result = $this->createResult();
|
||||
}
|
||||
|
||||
//@codingStandardsIgnoreStart
|
||||
for ($i = 0; $i < $this->timesRepeat && !$result->shouldStop(); $i++) {
|
||||
//@codingStandardsIgnoreEnd
|
||||
if ($this->test instanceof PHPUnit_Framework_TestSuite) {
|
||||
$this->test->setRunTestInSeparateProcess($this->processIsolation);
|
||||
}
|
||||
$this->test->run($result);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -1,107 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A Decorator for Tests.
|
||||
*
|
||||
* Use TestDecorator as the base class for defining new
|
||||
* test decorators. Test decorator subclasses can be introduced
|
||||
* to add behaviour before or after a test is run.
|
||||
*/
|
||||
class PHPUnit_Extensions_TestDecorator extends PHPUnit_Framework_Assert implements PHPUnit_Framework_Test, PHPUnit_Framework_SelfDescribing
|
||||
{
|
||||
/**
|
||||
* The Test to be decorated.
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $test = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
*/
|
||||
public function __construct(PHPUnit_Framework_Test $test)
|
||||
{
|
||||
$this->test = $test;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the test.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return $this->test->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the test and collects the
|
||||
* result in a TestResult.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*/
|
||||
public function basicRun(PHPUnit_Framework_TestResult $result)
|
||||
{
|
||||
$this->test->run($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of test cases that
|
||||
* will be run by this test.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return count($this->test);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a default TestResult object.
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*/
|
||||
protected function createResult()
|
||||
{
|
||||
return new PHPUnit_Framework_TestResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the test to be run.
|
||||
*
|
||||
* @return PHPUnit_Framework_Test
|
||||
*/
|
||||
public function getTest()
|
||||
{
|
||||
return $this->test;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the decorated test and collects the
|
||||
* result in a TestResult.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*/
|
||||
public function run(PHPUnit_Framework_TestResult $result = null)
|
||||
{
|
||||
if ($result === null) {
|
||||
$result = $this->createResult();
|
||||
}
|
||||
|
||||
$this->basicRun($result);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -1,194 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Base class for test listeners that interact with an issue tracker.
|
||||
*/
|
||||
abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_TestListener
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $ticketCounts = [];
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $ran = false;
|
||||
|
||||
/**
|
||||
* An error occurred.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* A failure occurred.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param PHPUnit_Framework_AssertionFailedError $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Incomplete test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Risky test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Skipped test.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*/
|
||||
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* A test suite started.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*/
|
||||
public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* A test suite ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*/
|
||||
public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* A test started.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
*/
|
||||
public function startTest(PHPUnit_Framework_Test $test)
|
||||
{
|
||||
if (!$test instanceof PHPUnit_Framework_WarningTestCase) {
|
||||
if ($this->ran) {
|
||||
return;
|
||||
}
|
||||
|
||||
$name = $test->getName(false);
|
||||
$tickets = PHPUnit_Util_Test::getTickets(get_class($test), $name);
|
||||
|
||||
foreach ($tickets as $ticket) {
|
||||
$this->ticketCounts[$ticket][$name] = 1;
|
||||
}
|
||||
|
||||
$this->ran = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A test ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param float $time
|
||||
*/
|
||||
public function endTest(PHPUnit_Framework_Test $test, $time)
|
||||
{
|
||||
if (!$test instanceof PHPUnit_Framework_WarningTestCase) {
|
||||
if ($test->getStatus() == PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) {
|
||||
$ifStatus = ['assigned', 'new', 'reopened'];
|
||||
$newStatus = 'closed';
|
||||
$message = 'Automatically closed by PHPUnit (test passed).';
|
||||
$resolution = 'fixed';
|
||||
$cumulative = true;
|
||||
} elseif ($test->getStatus() == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) {
|
||||
$ifStatus = ['closed'];
|
||||
$newStatus = 'reopened';
|
||||
$message = 'Automatically reopened by PHPUnit (test failed).';
|
||||
$resolution = '';
|
||||
$cumulative = false;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
$name = $test->getName(false);
|
||||
$tickets = PHPUnit_Util_Test::getTickets(get_class($test), $name);
|
||||
|
||||
foreach ($tickets as $ticket) {
|
||||
// Remove this test from the totals (if it passed).
|
||||
if ($test->getStatus() == PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) {
|
||||
unset($this->ticketCounts[$ticket][$name]);
|
||||
}
|
||||
|
||||
// Only close tickets if ALL referenced cases pass
|
||||
// but reopen tickets if a single test fails.
|
||||
if ($cumulative) {
|
||||
// Determine number of to-pass tests:
|
||||
if (count($this->ticketCounts[$ticket]) > 0) {
|
||||
// There exist remaining test cases with this reference.
|
||||
$adjustTicket = false;
|
||||
} else {
|
||||
// No remaining tickets, go ahead and adjust.
|
||||
$adjustTicket = true;
|
||||
}
|
||||
} else {
|
||||
$adjustTicket = true;
|
||||
}
|
||||
|
||||
$ticketInfo = $this->getTicketInfo($ticket);
|
||||
|
||||
if ($adjustTicket && in_array($ticketInfo['status'], $ifStatus)) {
|
||||
$this->updateTicket($ticket, $newStatus, $message, $resolution);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $ticketId
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
abstract protected function getTicketInfo($ticketId = null);
|
||||
|
||||
/**
|
||||
* @param string $ticketId
|
||||
* @param string $newStatus
|
||||
* @param string $message
|
||||
* @param string $resolution
|
||||
*/
|
||||
abstract protected function updateTicket($ticketId, $newStatus, $message, $resolution);
|
||||
}
|
||||
@@ -1,17 +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 PHPUnit\Framework;
|
||||
|
||||
use PHPUnit_Framework_TestCase;
|
||||
|
||||
abstract class TestCase extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
}
|
||||
@@ -1,17 +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 PHPUnit\Framework;
|
||||
|
||||
use PHPUnit_Framework_TestListener;
|
||||
|
||||
interface TestListener extends PHPUnit_Framework_TestListener
|
||||
{
|
||||
}
|
||||
@@ -1,17 +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 PHPUnit\Framework;
|
||||
|
||||
use PHPUnit_Framework_TestSuite;
|
||||
|
||||
class TestSuite extends PHPUnit_Framework_TestSuite
|
||||
{
|
||||
}
|
||||
3518
vendor/phpunit/phpunit/src/Framework/Assert.php
vendored
3518
vendor/phpunit/phpunit/src/Framework/Assert.php
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,58 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* An empty Listener that can be extended to implement TestListener
|
||||
* with just a few lines of code.
|
||||
*
|
||||
* @see PHPUnit_Framework_TestListener for documentation on the API methods.
|
||||
*/
|
||||
abstract class PHPUnit_Framework_BaseTestListener implements PHPUnit_Framework_TestListener
|
||||
{
|
||||
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
{
|
||||
}
|
||||
|
||||
public function addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time)
|
||||
{
|
||||
}
|
||||
|
||||
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
|
||||
{
|
||||
}
|
||||
|
||||
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
{
|
||||
}
|
||||
|
||||
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
{
|
||||
}
|
||||
|
||||
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
{
|
||||
}
|
||||
|
||||
public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
{
|
||||
}
|
||||
|
||||
public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
{
|
||||
}
|
||||
|
||||
public function startTest(PHPUnit_Framework_Test $test)
|
||||
{
|
||||
}
|
||||
|
||||
public function endTest(PHPUnit_Framework_Test $test, $time)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,13 +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.
|
||||
*/
|
||||
|
||||
class PHPUnit_Framework_CodeCoverageException extends PHPUnit_Framework_Exception
|
||||
{
|
||||
}
|
||||
149
vendor/phpunit/phpunit/src/Framework/Constraint.php
vendored
149
vendor/phpunit/phpunit/src/Framework/Constraint.php
vendored
@@ -1,149 +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.
|
||||
*/
|
||||
|
||||
use SebastianBergmann\Exporter\Exporter;
|
||||
|
||||
/**
|
||||
* Abstract base class for constraints which can be applied to any value.
|
||||
*/
|
||||
abstract class PHPUnit_Framework_Constraint implements Countable, PHPUnit_Framework_SelfDescribing
|
||||
{
|
||||
protected $exporter;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->exporter = new Exporter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
*
|
||||
* If $returnResult is true, the result of the evaluation is returned as
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
* @param string $description Additional information about the test
|
||||
* @param bool $returnResult Whether to return a result or throw an exception
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws PHPUnit_Framework_ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, $description = '', $returnResult = false)
|
||||
{
|
||||
$success = false;
|
||||
|
||||
if ($this->matches($other)) {
|
||||
$success = true;
|
||||
}
|
||||
|
||||
if ($returnResult) {
|
||||
return $success;
|
||||
}
|
||||
|
||||
if (!$success) {
|
||||
$this->fail($other, $description);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* This method can be overridden to implement the evaluation algorithm.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of constraint elements.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an exception for the given compared value and test description
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
* @param string $description Additional information about the test
|
||||
* @param SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure
|
||||
*
|
||||
* @throws PHPUnit_Framework_ExpectationFailedException
|
||||
*/
|
||||
protected function fail($other, $description, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null)
|
||||
{
|
||||
$failureDescription = sprintf(
|
||||
'Failed asserting that %s.',
|
||||
$this->failureDescription($other)
|
||||
);
|
||||
|
||||
$additionalFailureDescription = $this->additionalFailureDescription($other);
|
||||
|
||||
if ($additionalFailureDescription) {
|
||||
$failureDescription .= "\n" . $additionalFailureDescription;
|
||||
}
|
||||
|
||||
if (!empty($description)) {
|
||||
$failureDescription = $description . "\n" . $failureDescription;
|
||||
}
|
||||
|
||||
throw new PHPUnit_Framework_ExpectationFailedException(
|
||||
$failureDescription,
|
||||
$comparisonFailure
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return additional failure description where needed
|
||||
*
|
||||
* The function can be overridden to provide additional failure
|
||||
* information like a diff
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function additionalFailureDescription($other)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* To provide additional failure information additionalFailureDescription
|
||||
* can be used.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
{
|
||||
return $this->exporter->export($other) . ' ' . $this->toString();
|
||||
}
|
||||
}
|
||||
@@ -1,121 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Logical AND.
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_And extends PHPUnit_Framework_Constraint
|
||||
{
|
||||
/**
|
||||
* @var PHPUnit_Framework_Constraint[]
|
||||
*/
|
||||
protected $constraints = [];
|
||||
|
||||
/**
|
||||
* @var PHPUnit_Framework_Constraint
|
||||
*/
|
||||
protected $lastConstraint = null;
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_Constraint[] $constraints
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function setConstraints(array $constraints)
|
||||
{
|
||||
$this->constraints = [];
|
||||
|
||||
foreach ($constraints as $constraint) {
|
||||
if (!($constraint instanceof PHPUnit_Framework_Constraint)) {
|
||||
throw new PHPUnit_Framework_Exception(
|
||||
'All parameters to ' . __CLASS__ .
|
||||
' must be a constraint object.'
|
||||
);
|
||||
}
|
||||
|
||||
$this->constraints[] = $constraint;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
*
|
||||
* If $returnResult is true, the result of the evaluation is returned as
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
* @param string $description Additional information about the test
|
||||
* @param bool $returnResult Whether to return a result or throw an exception
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws PHPUnit_Framework_ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, $description = '', $returnResult = false)
|
||||
{
|
||||
$success = true;
|
||||
$constraint = null;
|
||||
|
||||
foreach ($this->constraints as $constraint) {
|
||||
if (!$constraint->evaluate($other, $description, true)) {
|
||||
$success = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($returnResult) {
|
||||
return $success;
|
||||
}
|
||||
|
||||
if (!$success) {
|
||||
$this->fail($other, $description);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
$text = '';
|
||||
|
||||
foreach ($this->constraints as $key => $constraint) {
|
||||
if ($key > 0) {
|
||||
$text .= ' and ';
|
||||
}
|
||||
|
||||
$text .= $constraint->toString();
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of constraint elements.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
$count = 0;
|
||||
|
||||
foreach ($this->constraints as $constraint) {
|
||||
$count += count($constraint);
|
||||
}
|
||||
|
||||
return $count;
|
||||
}
|
||||
}
|
||||
@@ -1,107 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constraint that asserts that the array it is evaluated for has a specified subset.
|
||||
*
|
||||
* Uses array_replace_recursive() to check if a key value subset is part of the
|
||||
* subject array.
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_ArraySubset extends PHPUnit_Framework_Constraint
|
||||
{
|
||||
/**
|
||||
* @var array|Traversable
|
||||
*/
|
||||
protected $subset;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $strict;
|
||||
|
||||
/**
|
||||
* @param array|Traversable $subset
|
||||
* @param bool $strict Check for object identity
|
||||
*/
|
||||
public function __construct($subset, $strict = false)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->strict = $strict;
|
||||
$this->subset = $subset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param array|Traversable $other Array or Traversable object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
{
|
||||
//type cast $other & $this->subset as an array to allow
|
||||
//support in standard array functions.
|
||||
$other = $this->toArray($other);
|
||||
$this->subset = $this->toArray($this->subset);
|
||||
|
||||
$patched = array_replace_recursive($other, $this->subset);
|
||||
|
||||
if ($this->strict) {
|
||||
return $other === $patched;
|
||||
} else {
|
||||
return $other == $patched;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'has the subset ' . $this->exporter->export($this->subset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
{
|
||||
return 'an array ' . $this->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|Traversable $other
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function toArray($other)
|
||||
{
|
||||
if (is_array($other)) {
|
||||
return $other;
|
||||
} elseif ($other instanceof ArrayObject) {
|
||||
return $other->getArrayCopy();
|
||||
} elseif ($other instanceof Traversable) {
|
||||
return iterator_to_array($other);
|
||||
}
|
||||
|
||||
// Keep BC even if we know that array would not be the expected one
|
||||
return (array) $other;
|
||||
}
|
||||
}
|
||||
@@ -1,84 +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.
|
||||
*/
|
||||
|
||||
class PHPUnit_Framework_Constraint_Attribute extends PHPUnit_Framework_Constraint_Composite
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $attributeName;
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_Constraint $constraint
|
||||
* @param string $attributeName
|
||||
*/
|
||||
public function __construct(PHPUnit_Framework_Constraint $constraint, $attributeName)
|
||||
{
|
||||
parent::__construct($constraint);
|
||||
|
||||
$this->attributeName = $attributeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
*
|
||||
* If $returnResult is true, the result of the evaluation is returned as
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
* @param string $description Additional information about the test
|
||||
* @param bool $returnResult Whether to return a result or throw an exception
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws PHPUnit_Framework_ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, $description = '', $returnResult = false)
|
||||
{
|
||||
return parent::evaluate(
|
||||
PHPUnit_Framework_Assert::readAttribute(
|
||||
$other,
|
||||
$this->attributeName
|
||||
),
|
||||
$description,
|
||||
$returnResult
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'attribute "' . $this->attributeName . '" ' .
|
||||
$this->innerConstraint->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
{
|
||||
return $this->toString();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,32 +7,29 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
/**
|
||||
* Constraint that accepts false.
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsFalse extends PHPUnit_Framework_Constraint
|
||||
final class IsFalse extends Constraint
|
||||
{
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is false';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return $other === false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is false';
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,32 +7,29 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
/**
|
||||
* Constraint that accepts true.
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsTrue extends PHPUnit_Framework_Constraint
|
||||
final class IsTrue extends Constraint
|
||||
{
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is true';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return $other === true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is true';
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,53 +7,46 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
/**
|
||||
* Constraint that evaluates against a specified closure.
|
||||
* @psalm-template CallbackInput of mixed
|
||||
*
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_Callback extends PHPUnit_Framework_Constraint
|
||||
final class Callback extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var callable
|
||||
*
|
||||
* @psalm-var callable(CallbackInput $input): bool
|
||||
*/
|
||||
private $callback;
|
||||
|
||||
/**
|
||||
* @param callable $callback
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($callback)
|
||||
/** @psalm-param callable(CallbackInput $input): bool $callback */
|
||||
public function __construct(callable $callback)
|
||||
{
|
||||
if (!is_callable($callback)) {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(
|
||||
1,
|
||||
'callable'
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->callback = $callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is accepted by specified callback';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $value. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
* @param mixed $other value or object to evaluate
|
||||
*
|
||||
* @return bool
|
||||
* @psalm-param CallbackInput $other
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return call_user_func($this->callback, $other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is accepted by specified callback';
|
||||
return ($this->callback)($other);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,56 +7,90 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
class PHPUnit_Framework_Constraint_Count extends PHPUnit_Framework_Constraint
|
||||
use function count;
|
||||
use function is_array;
|
||||
use function iterator_count;
|
||||
use function sprintf;
|
||||
use Countable;
|
||||
use EmptyIterator;
|
||||
use Generator;
|
||||
use Iterator;
|
||||
use IteratorAggregate;
|
||||
use PHPUnit\Framework\Exception;
|
||||
use Traversable;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class Count extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $expectedCount = 0;
|
||||
private $expectedCount;
|
||||
|
||||
/**
|
||||
* @param int $expected
|
||||
*/
|
||||
public function __construct($expected)
|
||||
public function __construct(int $expected)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->expectedCount = $expected;
|
||||
}
|
||||
|
||||
public function toString(): string
|
||||
{
|
||||
return sprintf(
|
||||
'count matches %d',
|
||||
$this->expectedCount
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other
|
||||
*
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return $this->expectedCount === $this->getCountOf($other);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $other
|
||||
*
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function getCountOf($other)
|
||||
protected function getCountOf($other): ?int
|
||||
{
|
||||
if ($other instanceof Countable || is_array($other)) {
|
||||
return count($other);
|
||||
} elseif ($other instanceof Traversable) {
|
||||
if ($other instanceof IteratorAggregate) {
|
||||
$iterator = $other->getIterator();
|
||||
} else {
|
||||
$iterator = $other;
|
||||
}
|
||||
|
||||
if ($other instanceof EmptyIterator) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($other instanceof Traversable) {
|
||||
while ($other instanceof IteratorAggregate) {
|
||||
try {
|
||||
$other = $other->getIterator();
|
||||
} catch (\Exception $e) {
|
||||
throw new Exception(
|
||||
$e->getMessage(),
|
||||
$e->getCode(),
|
||||
$e
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$iterator = $other;
|
||||
|
||||
if ($iterator instanceof Generator) {
|
||||
return $this->getCountOfGenerator($iterator);
|
||||
}
|
||||
|
||||
if (!$iterator instanceof Iterator) {
|
||||
return iterator_count($iterator);
|
||||
}
|
||||
|
||||
$key = $iterator->key();
|
||||
$count = iterator_count($iterator);
|
||||
|
||||
@@ -64,6 +98,7 @@ class PHPUnit_Framework_Constraint_Count extends PHPUnit_Framework_Constraint
|
||||
// moves pointer.
|
||||
if ($key !== null) {
|
||||
$iterator->rewind();
|
||||
|
||||
while ($iterator->valid() && $key !== $iterator->key()) {
|
||||
$iterator->next();
|
||||
}
|
||||
@@ -71,20 +106,18 @@ class PHPUnit_Framework_Constraint_Count extends PHPUnit_Framework_Constraint
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total number of iterations from a generator.
|
||||
* This will fully exhaust the generator.
|
||||
*
|
||||
* @param Generator $generator
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
protected function getCountOfGenerator(Generator $generator)
|
||||
protected function getCountOfGenerator(Generator $generator): int
|
||||
{
|
||||
for ($count = 0; $generator->valid(); $generator->next()) {
|
||||
$count += 1;
|
||||
$count++;
|
||||
}
|
||||
|
||||
return $count;
|
||||
@@ -96,26 +129,13 @@ class PHPUnit_Framework_Constraint_Count extends PHPUnit_Framework_Constraint
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
return sprintf(
|
||||
'actual size %d matches expected size %d',
|
||||
$this->getCountOf($other),
|
||||
$this->expectedCount
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return sprintf(
|
||||
'count matches %d',
|
||||
(int) $this->getCountOf($other),
|
||||
$this->expectedCount
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,47 +7,44 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
/**
|
||||
* Constraint that asserts that the value it is evaluated for is greater
|
||||
* than a given value.
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_GreaterThan extends PHPUnit_Framework_Constraint
|
||||
final class GreaterThan extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var numeric
|
||||
* @var float|int
|
||||
*/
|
||||
protected $value;
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* @param numeric $value
|
||||
* @param float|int $value
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is greater than ' . $this->exporter()->export($this->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return $this->value < $other;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is greater than ' . $this->exporter->export($this->value);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,22 +7,40 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function count;
|
||||
use function gettype;
|
||||
use function sprintf;
|
||||
use function strpos;
|
||||
use Countable;
|
||||
use EmptyIterator;
|
||||
|
||||
/**
|
||||
* Constraint that checks whether a variable is empty().
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsEmpty extends PHPUnit_Framework_Constraint
|
||||
final class IsEmpty extends Constraint
|
||||
{
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is empty';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
if ($other instanceof EmptyIterator) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($other instanceof Countable) {
|
||||
return count($other) === 0;
|
||||
}
|
||||
@@ -31,32 +49,20 @@ class PHPUnit_Framework_Constraint_IsEmpty extends PHPUnit_Framework_Constraint
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is empty';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
$type = gettype($other);
|
||||
|
||||
return sprintf(
|
||||
'%s %s %s',
|
||||
$type[0] == 'a' || $type[0] == 'o' ? 'an' : 'a',
|
||||
strpos($type, 'a') === 0 || strpos($type, 'o') === 0 ? 'an' : 'a',
|
||||
$type,
|
||||
$this->toString()
|
||||
);
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,47 +7,44 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
/**
|
||||
* Constraint that asserts that the value it is evaluated for is less than
|
||||
* a given value.
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_LessThan extends PHPUnit_Framework_Constraint
|
||||
final class LessThan extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var numeric
|
||||
* @var float|int
|
||||
*/
|
||||
protected $value;
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* @param numeric $value
|
||||
* @param float|int $value
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is less than ' . $this->exporter()->export($this->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return $this->value > $other;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is less than ' . $this->exporter->export($this->value);
|
||||
}
|
||||
}
|
||||
21
vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php
vendored
Normal file
21
vendor/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class SameSize extends Count
|
||||
{
|
||||
public function __construct(iterable $expected)
|
||||
{
|
||||
parent::__construct((int) $this->getCountOf($expected));
|
||||
}
|
||||
}
|
||||
@@ -1,80 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constraint that asserts that the class it is evaluated for has a given
|
||||
* attribute.
|
||||
*
|
||||
* The attribute name is passed in the constructor.
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_ClassHasAttribute extends PHPUnit_Framework_Constraint
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $attributeName;
|
||||
|
||||
/**
|
||||
* @param string $attributeName
|
||||
*/
|
||||
public function __construct($attributeName)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->attributeName = $attributeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
{
|
||||
$class = new ReflectionClass($other);
|
||||
|
||||
return $class->hasProperty($this->attributeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return sprintf(
|
||||
'has attribute "%s"',
|
||||
$this->attributeName
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
{
|
||||
return sprintf(
|
||||
'%sclass "%s" %s',
|
||||
is_object($other) ? 'object of ' : '',
|
||||
is_object($other) ? get_class($other) : $other,
|
||||
$this->toString()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,52 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constraint that asserts that the class it is evaluated for has a given
|
||||
* static attribute.
|
||||
*
|
||||
* The attribute name is passed in the constructor.
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_ClassHasStaticAttribute extends PHPUnit_Framework_Constraint_ClassHasAttribute
|
||||
{
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
{
|
||||
$class = new ReflectionClass($other);
|
||||
|
||||
if ($class->hasProperty($this->attributeName)) {
|
||||
$attribute = $class->getProperty($this->attributeName);
|
||||
|
||||
return $attribute->isStatic();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return sprintf(
|
||||
'has static attribute "%s"',
|
||||
$this->attributeName
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,67 +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.
|
||||
*/
|
||||
|
||||
abstract class PHPUnit_Framework_Constraint_Composite extends PHPUnit_Framework_Constraint
|
||||
{
|
||||
/**
|
||||
* @var PHPUnit_Framework_Constraint
|
||||
*/
|
||||
protected $innerConstraint;
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_Constraint $innerConstraint
|
||||
*/
|
||||
public function __construct(PHPUnit_Framework_Constraint $innerConstraint)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->innerConstraint = $innerConstraint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
*
|
||||
* If $returnResult is true, the result of the evaluation is returned as
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
* @param string $description Additional information about the test
|
||||
* @param bool $returnResult Whether to return a result or throw an exception
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws PHPUnit_Framework_ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, $description = '', $returnResult = false)
|
||||
{
|
||||
try {
|
||||
return $this->innerConstraint->evaluate(
|
||||
$other,
|
||||
$description,
|
||||
$returnResult
|
||||
);
|
||||
} catch (PHPUnit_Framework_ExpectationFailedException $e) {
|
||||
$this->fail($other, $description);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of constraint elements.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return count($this->innerConstraint);
|
||||
}
|
||||
}
|
||||
270
vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php
vendored
Normal file
270
vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php
vendored
Normal file
@@ -0,0 +1,270 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function sprintf;
|
||||
use Countable;
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
use PHPUnit\Framework\SelfDescribing;
|
||||
use SebastianBergmann\Comparator\ComparisonFailure;
|
||||
use SebastianBergmann\Exporter\Exporter;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
abstract class Constraint implements Countable, SelfDescribing
|
||||
{
|
||||
/**
|
||||
* @var ?Exporter
|
||||
*/
|
||||
private $exporter;
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other.
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
*
|
||||
* If $returnResult is true, the result of the evaluation is returned as
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
* @throws ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
|
||||
{
|
||||
$success = false;
|
||||
|
||||
if ($this->matches($other)) {
|
||||
$success = true;
|
||||
}
|
||||
|
||||
if ($returnResult) {
|
||||
return $success;
|
||||
}
|
||||
|
||||
if (!$success) {
|
||||
$this->fail($other, $description);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of constraint elements.
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
protected function exporter(): Exporter
|
||||
{
|
||||
if ($this->exporter === null) {
|
||||
$this->exporter = new Exporter;
|
||||
}
|
||||
|
||||
return $this->exporter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* This method can be overridden to implement the evaluation algorithm.
|
||||
*
|
||||
* @param mixed $other value or object to evaluate
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws an exception for the given compared value and test description.
|
||||
*
|
||||
* @param mixed $other evaluated value or object
|
||||
* @param string $description Additional information about the test
|
||||
* @param ComparisonFailure $comparisonFailure
|
||||
*
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
* @throws ExpectationFailedException
|
||||
*
|
||||
* @psalm-return never-return
|
||||
*/
|
||||
protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): void
|
||||
{
|
||||
$failureDescription = sprintf(
|
||||
'Failed asserting that %s.',
|
||||
$this->failureDescription($other)
|
||||
);
|
||||
|
||||
$additionalFailureDescription = $this->additionalFailureDescription($other);
|
||||
|
||||
if ($additionalFailureDescription) {
|
||||
$failureDescription .= "\n" . $additionalFailureDescription;
|
||||
}
|
||||
|
||||
if (!empty($description)) {
|
||||
$failureDescription = $description . "\n" . $failureDescription;
|
||||
}
|
||||
|
||||
throw new ExpectationFailedException(
|
||||
$failureDescription,
|
||||
$comparisonFailure
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return additional failure description where needed.
|
||||
*
|
||||
* The function can be overridden to provide additional failure
|
||||
* information like a diff
|
||||
*
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function additionalFailureDescription($other): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* To provide additional failure information additionalFailureDescription
|
||||
* can be used.
|
||||
*
|
||||
* @param mixed $other evaluated value or object
|
||||
*
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*/
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
return $this->exporter()->export($other) . ' ' . $this->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a custom string representation of the constraint object when it
|
||||
* appears in context of an $operator expression.
|
||||
*
|
||||
* The purpose of this method is to provide meaningful descriptive string
|
||||
* in context of operators such as LogicalNot. Native PHPUnit constraints
|
||||
* are supported out of the box by LogicalNot, but externally developed
|
||||
* ones had no way to provide correct strings in this context.
|
||||
*
|
||||
* The method shall return empty string, when it does not handle
|
||||
* customization by itself.
|
||||
*
|
||||
* @param Operator $operator the $operator of the expression
|
||||
* @param mixed $role role of $this constraint in the $operator expression
|
||||
*/
|
||||
protected function toStringInContext(Operator $operator, $role): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure when this constraint appears in
|
||||
* context of an $operator expression.
|
||||
*
|
||||
* The purpose of this method is to provide meaningful failure description
|
||||
* in context of operators such as LogicalNot. Native PHPUnit constraints
|
||||
* are supported out of the box by LogicalNot, but externally developed
|
||||
* ones had no way to provide correct messages in this context.
|
||||
*
|
||||
* The method shall return empty string, when it does not handle
|
||||
* customization by itself.
|
||||
*
|
||||
* @param Operator $operator the $operator of the expression
|
||||
* @param mixed $role role of $this constraint in the $operator expression
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function failureDescriptionInContext(Operator $operator, $role, $other): string
|
||||
{
|
||||
$string = $this->toStringInContext($operator, $role);
|
||||
|
||||
if ($string === '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $this->exporter()->export($other) . ' ' . $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduces the sub-expression starting at $this by skipping degenerate
|
||||
* sub-expression and returns first descendant constraint that starts
|
||||
* a non-reducible sub-expression.
|
||||
*
|
||||
* Returns $this for terminal constraints and for operators that start
|
||||
* non-reducible sub-expression, or the nearest descendant of $this that
|
||||
* starts a non-reducible sub-expression.
|
||||
*
|
||||
* A constraint expression may be modelled as a tree with non-terminal
|
||||
* nodes (operators) and terminal nodes. For example:
|
||||
*
|
||||
* LogicalOr (operator, non-terminal)
|
||||
* + LogicalAnd (operator, non-terminal)
|
||||
* | + IsType('int') (terminal)
|
||||
* | + GreaterThan(10) (terminal)
|
||||
* + LogicalNot (operator, non-terminal)
|
||||
* + IsType('array') (terminal)
|
||||
*
|
||||
* A degenerate sub-expression is a part of the tree, that effectively does
|
||||
* not contribute to the evaluation of the expression it appears in. An example
|
||||
* of degenerate sub-expression is a BinaryOperator constructed with single
|
||||
* operand or nested BinaryOperators, each with single operand. An
|
||||
* expression involving a degenerate sub-expression is equivalent to a
|
||||
* reduced expression with the degenerate sub-expression removed, for example
|
||||
*
|
||||
* LogicalAnd (operator)
|
||||
* + LogicalOr (degenerate operator)
|
||||
* | + LogicalAnd (degenerate operator)
|
||||
* | + IsType('int') (terminal)
|
||||
* + GreaterThan(10) (terminal)
|
||||
*
|
||||
* is equivalent to
|
||||
*
|
||||
* LogicalAnd (operator)
|
||||
* + IsType('int') (terminal)
|
||||
* + GreaterThan(10) (terminal)
|
||||
*
|
||||
* because the subexpression
|
||||
*
|
||||
* + LogicalOr
|
||||
* + LogicalAnd
|
||||
* + -
|
||||
*
|
||||
* is degenerate. Calling reduce() on the LogicalOr object above, as well
|
||||
* as on LogicalAnd, shall return the IsType('int') instance.
|
||||
*
|
||||
* Other specific reductions can be implemented, for example cascade of
|
||||
* LogicalNot operators
|
||||
*
|
||||
* + LogicalNot
|
||||
* + LogicalNot
|
||||
* +LogicalNot
|
||||
* + IsTrue
|
||||
*
|
||||
* can be reduced to
|
||||
*
|
||||
* LogicalNot
|
||||
* + IsTrue
|
||||
*/
|
||||
protected function reduce(): self
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
138
vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php
vendored
Normal file
138
vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function is_string;
|
||||
use function sprintf;
|
||||
use function strpos;
|
||||
use function trim;
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
use SebastianBergmann\Comparator\ComparisonFailure;
|
||||
use SebastianBergmann\Comparator\Factory as ComparatorFactory;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class IsEqual extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
private $delta;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $canonicalize;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $ignoreCase;
|
||||
|
||||
public function __construct($value, float $delta = 0.0, bool $canonicalize = false, bool $ignoreCase = false)
|
||||
{
|
||||
$this->value = $value;
|
||||
$this->delta = $delta;
|
||||
$this->canonicalize = $canonicalize;
|
||||
$this->ignoreCase = $ignoreCase;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other.
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
*
|
||||
* If $returnResult is true, the result of the evaluation is returned as
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @throws ExpectationFailedException
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
|
||||
{
|
||||
// If $this->value and $other are identical, they are also equal.
|
||||
// This is the most common path and will allow us to skip
|
||||
// initialization of all the comparators.
|
||||
if ($this->value === $other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$comparatorFactory = ComparatorFactory::getInstance();
|
||||
|
||||
try {
|
||||
$comparator = $comparatorFactory->getComparatorFor(
|
||||
$this->value,
|
||||
$other
|
||||
);
|
||||
|
||||
$comparator->assertEquals(
|
||||
$this->value,
|
||||
$other,
|
||||
$this->delta,
|
||||
$this->canonicalize,
|
||||
$this->ignoreCase
|
||||
);
|
||||
} catch (ComparisonFailure $f) {
|
||||
if ($returnResult) {
|
||||
return false;
|
||||
}
|
||||
|
||||
throw new ExpectationFailedException(
|
||||
trim($description . "\n" . $f->getMessage()),
|
||||
$f
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
$delta = '';
|
||||
|
||||
if (is_string($this->value)) {
|
||||
if (strpos($this->value, "\n") !== false) {
|
||||
return 'is equal to <text>';
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
"is equal to '%s'",
|
||||
$this->value
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->delta != 0) {
|
||||
$delta = sprintf(
|
||||
' with delta <%F>',
|
||||
$this->delta
|
||||
);
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'is equal to %s%s',
|
||||
$this->exporter()->export($this->value),
|
||||
$delta
|
||||
);
|
||||
}
|
||||
}
|
||||
108
vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php
vendored
Normal file
108
vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function is_string;
|
||||
use function sprintf;
|
||||
use function strpos;
|
||||
use function trim;
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
use SebastianBergmann\Comparator\ComparisonFailure;
|
||||
use SebastianBergmann\Comparator\Factory as ComparatorFactory;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class IsEqualCanonicalizing extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
private $value;
|
||||
|
||||
public function __construct($value)
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other.
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
*
|
||||
* If $returnResult is true, the result of the evaluation is returned as
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @throws ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
|
||||
{
|
||||
// If $this->value and $other are identical, they are also equal.
|
||||
// This is the most common path and will allow us to skip
|
||||
// initialization of all the comparators.
|
||||
if ($this->value === $other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$comparatorFactory = ComparatorFactory::getInstance();
|
||||
|
||||
try {
|
||||
$comparator = $comparatorFactory->getComparatorFor(
|
||||
$this->value,
|
||||
$other
|
||||
);
|
||||
|
||||
$comparator->assertEquals(
|
||||
$this->value,
|
||||
$other,
|
||||
0.0,
|
||||
true,
|
||||
false
|
||||
);
|
||||
} catch (ComparisonFailure $f) {
|
||||
if ($returnResult) {
|
||||
return false;
|
||||
}
|
||||
|
||||
throw new ExpectationFailedException(
|
||||
trim($description . "\n" . $f->getMessage()),
|
||||
$f
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
if (is_string($this->value)) {
|
||||
if (strpos($this->value, "\n") !== false) {
|
||||
return 'is equal to <text>';
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
"is equal to '%s'",
|
||||
$this->value
|
||||
);
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'is equal to %s',
|
||||
$this->exporter()->export($this->value)
|
||||
);
|
||||
}
|
||||
}
|
||||
108
vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php
vendored
Normal file
108
vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function is_string;
|
||||
use function sprintf;
|
||||
use function strpos;
|
||||
use function trim;
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
use SebastianBergmann\Comparator\ComparisonFailure;
|
||||
use SebastianBergmann\Comparator\Factory as ComparatorFactory;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class IsEqualIgnoringCase extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
private $value;
|
||||
|
||||
public function __construct($value)
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other.
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
*
|
||||
* If $returnResult is true, the result of the evaluation is returned as
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @throws ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
|
||||
{
|
||||
// If $this->value and $other are identical, they are also equal.
|
||||
// This is the most common path and will allow us to skip
|
||||
// initialization of all the comparators.
|
||||
if ($this->value === $other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$comparatorFactory = ComparatorFactory::getInstance();
|
||||
|
||||
try {
|
||||
$comparator = $comparatorFactory->getComparatorFor(
|
||||
$this->value,
|
||||
$other
|
||||
);
|
||||
|
||||
$comparator->assertEquals(
|
||||
$this->value,
|
||||
$other,
|
||||
0.0,
|
||||
false,
|
||||
true
|
||||
);
|
||||
} catch (ComparisonFailure $f) {
|
||||
if ($returnResult) {
|
||||
return false;
|
||||
}
|
||||
|
||||
throw new ExpectationFailedException(
|
||||
trim($description . "\n" . $f->getMessage()),
|
||||
$f
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
if (is_string($this->value)) {
|
||||
if (strpos($this->value, "\n") !== false) {
|
||||
return 'is equal to <text>';
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
"is equal to '%s'",
|
||||
$this->value
|
||||
);
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'is equal to %s',
|
||||
$this->exporter()->export($this->value)
|
||||
);
|
||||
}
|
||||
}
|
||||
100
vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php
vendored
Normal file
100
vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function sprintf;
|
||||
use function trim;
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
use SebastianBergmann\Comparator\ComparisonFailure;
|
||||
use SebastianBergmann\Comparator\Factory as ComparatorFactory;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class IsEqualWithDelta extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
private $delta;
|
||||
|
||||
public function __construct($value, float $delta)
|
||||
{
|
||||
$this->value = $value;
|
||||
$this->delta = $delta;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other.
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
*
|
||||
* If $returnResult is true, the result of the evaluation is returned as
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @throws ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
|
||||
{
|
||||
// If $this->value and $other are identical, they are also equal.
|
||||
// This is the most common path and will allow us to skip
|
||||
// initialization of all the comparators.
|
||||
if ($this->value === $other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$comparatorFactory = ComparatorFactory::getInstance();
|
||||
|
||||
try {
|
||||
$comparator = $comparatorFactory->getComparatorFor(
|
||||
$this->value,
|
||||
$other
|
||||
);
|
||||
|
||||
$comparator->assertEquals(
|
||||
$this->value,
|
||||
$other,
|
||||
$this->delta
|
||||
);
|
||||
} catch (ComparisonFailure $f) {
|
||||
if ($returnResult) {
|
||||
return false;
|
||||
}
|
||||
|
||||
throw new ExpectationFailedException(
|
||||
trim($description . "\n" . $f->getMessage()),
|
||||
$f
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return sprintf(
|
||||
'is equal to %s with delta <%F>>',
|
||||
$this->exporter()->export($this->value),
|
||||
$this->delta
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,53 +7,66 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
class PHPUnit_Framework_Constraint_Exception extends PHPUnit_Framework_Constraint
|
||||
use function get_class;
|
||||
use function sprintf;
|
||||
use PHPUnit\Util\Filter;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class Exception extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $className;
|
||||
private $className;
|
||||
|
||||
public function __construct(string $className)
|
||||
{
|
||||
$this->className = $className;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $className
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function __construct($className)
|
||||
public function toString(): string
|
||||
{
|
||||
parent::__construct();
|
||||
$this->className = $className;
|
||||
return sprintf(
|
||||
'exception of type "%s"',
|
||||
$this->className
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return $other instanceof $this->className;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
if ($other !== null) {
|
||||
$message = '';
|
||||
if ($other instanceof Exception || $other instanceof Throwable) {
|
||||
|
||||
if ($other instanceof Throwable) {
|
||||
$message = '. Message was: "' . $other->getMessage() . '" at'
|
||||
. "\n" . PHPUnit_Util_Filter::getFilteredStacktrace($other);
|
||||
. "\n" . Filter::getFilteredStacktrace($other);
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
@@ -69,17 +82,4 @@ class PHPUnit_Framework_Constraint_Exception extends PHPUnit_Framework_Constrain
|
||||
$this->className
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return sprintf(
|
||||
'exception of type "%s"',
|
||||
$this->className
|
||||
);
|
||||
}
|
||||
}
|
||||
67
vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php
vendored
Normal file
67
vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function sprintf;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class ExceptionCode extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
private $expectedCode;
|
||||
|
||||
/**
|
||||
* @param int|string $expected
|
||||
*/
|
||||
public function __construct($expected)
|
||||
{
|
||||
$this->expectedCode = $expected;
|
||||
}
|
||||
|
||||
public function toString(): string
|
||||
{
|
||||
return 'exception code is ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param Throwable $other
|
||||
*/
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return (string) $other->getCode() === (string) $this->expectedCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other evaluated value or object
|
||||
*
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*/
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
return sprintf(
|
||||
'%s is equal to expected exception code %s',
|
||||
$this->exporter()->export($other->getCode()),
|
||||
$this->exporter()->export($this->expectedCode)
|
||||
);
|
||||
}
|
||||
}
|
||||
78
vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php
vendored
Normal file
78
vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function sprintf;
|
||||
use function strpos;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class ExceptionMessage extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $expectedMessage;
|
||||
|
||||
public function __construct(string $expected)
|
||||
{
|
||||
$this->expectedMessage = $expected;
|
||||
}
|
||||
|
||||
public function toString(): string
|
||||
{
|
||||
if ($this->expectedMessage === '') {
|
||||
return 'exception message is empty';
|
||||
}
|
||||
|
||||
return 'exception message contains ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param Throwable $other
|
||||
*/
|
||||
protected function matches($other): bool
|
||||
{
|
||||
if ($this->expectedMessage === '') {
|
||||
return $other->getMessage() === '';
|
||||
}
|
||||
|
||||
return strpos((string) $other->getMessage(), $this->expectedMessage) !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
if ($this->expectedMessage === '') {
|
||||
return sprintf(
|
||||
"exception message is empty but is '%s'",
|
||||
$other->getMessage()
|
||||
);
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
"exception message '%s' contains '%s'",
|
||||
$other->getMessage(),
|
||||
$this->expectedMessage
|
||||
);
|
||||
}
|
||||
}
|
||||
74
vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php
vendored
Normal file
74
vendor/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function sprintf;
|
||||
use Exception;
|
||||
use PHPUnit\Util\RegularExpression as RegularExpressionUtil;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class ExceptionMessageRegularExpression extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $expectedMessageRegExp;
|
||||
|
||||
public function __construct(string $expected)
|
||||
{
|
||||
$this->expectedMessageRegExp = $expected;
|
||||
}
|
||||
|
||||
public function toString(): string
|
||||
{
|
||||
return 'exception message matches ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param \PHPUnit\Framework\Exception $other
|
||||
*
|
||||
* @throws \PHPUnit\Framework\Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function matches($other): bool
|
||||
{
|
||||
$match = RegularExpressionUtil::safeMatch($this->expectedMessageRegExp, $other->getMessage());
|
||||
|
||||
if ($match === false) {
|
||||
throw new \PHPUnit\Framework\Exception(
|
||||
"Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'"
|
||||
);
|
||||
}
|
||||
|
||||
return $match === 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
return sprintf(
|
||||
"exception message '%s' matches '%s'",
|
||||
$other->getMessage(),
|
||||
$this->expectedMessageRegExp
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,66 +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.
|
||||
*/
|
||||
|
||||
class PHPUnit_Framework_Constraint_ExceptionCode extends PHPUnit_Framework_Constraint
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $expectedCode;
|
||||
|
||||
/**
|
||||
* @param int $expected
|
||||
*/
|
||||
public function __construct($expected)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->expectedCode = $expected;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param Exception $other
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
{
|
||||
return (string) $other->getCode() == (string) $this->expectedCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
{
|
||||
return sprintf(
|
||||
'%s is equal to expected exception code %s',
|
||||
$this->exporter->export($other->getCode()),
|
||||
$this->exporter->export($this->expectedCode)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'exception code is ';
|
||||
}
|
||||
}
|
||||
@@ -1,66 +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.
|
||||
*/
|
||||
|
||||
class PHPUnit_Framework_Constraint_ExceptionMessage extends PHPUnit_Framework_Constraint
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $expectedMessage;
|
||||
|
||||
/**
|
||||
* @param string $expected
|
||||
*/
|
||||
public function __construct($expected)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->expectedMessage = $expected;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param Exception $other
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
{
|
||||
return strpos($other->getMessage(), $this->expectedMessage) !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
{
|
||||
return sprintf(
|
||||
"exception message '%s' contains '%s'",
|
||||
$other->getMessage(),
|
||||
$this->expectedMessage
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'exception message contains ';
|
||||
}
|
||||
}
|
||||
@@ -1,74 +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.
|
||||
*/
|
||||
|
||||
class PHPUnit_Framework_Constraint_ExceptionMessageRegExp extends PHPUnit_Framework_Constraint
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $expectedMessageRegExp;
|
||||
|
||||
/**
|
||||
* @param string $expected
|
||||
*/
|
||||
public function __construct($expected)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->expectedMessageRegExp = $expected;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param Exception $other
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
{
|
||||
$match = PHPUnit_Util_Regex::pregMatchSafe($this->expectedMessageRegExp, $other->getMessage());
|
||||
|
||||
if (false === $match) {
|
||||
throw new PHPUnit_Framework_Exception(
|
||||
"Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'"
|
||||
);
|
||||
}
|
||||
|
||||
return 1 === $match;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
{
|
||||
return sprintf(
|
||||
"exception message '%s' matches '%s'",
|
||||
$other->getMessage(),
|
||||
$this->expectedMessageRegExp
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'exception message matches ';
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,52 +7,48 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function is_dir;
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* Constraint that checks if the directory(name) that it is evaluated for exists.
|
||||
*
|
||||
* The file path to check is passed as $other in evaluate().
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_DirectoryExists extends PHPUnit_Framework_Constraint
|
||||
final class DirectoryExists extends Constraint
|
||||
{
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'directory exists';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return is_dir($other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
return sprintf(
|
||||
'directory "%s" exists',
|
||||
$other
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'directory exists';
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,52 +7,48 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function file_exists;
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* Constraint that checks if the file(name) that it is evaluated for exists.
|
||||
*
|
||||
* The file path to check is passed as $other in evaluate().
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_FileExists extends PHPUnit_Framework_Constraint
|
||||
final class FileExists extends Constraint
|
||||
{
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'file exists';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return file_exists($other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
return sprintf(
|
||||
'file "%s" exists',
|
||||
$other
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'file exists';
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,52 +7,48 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function is_readable;
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* Constraint that checks if the file/dir(name) that it is evaluated for is readable.
|
||||
*
|
||||
* The file path to check is passed as $other in evaluate().
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsReadable extends PHPUnit_Framework_Constraint
|
||||
final class IsReadable extends Constraint
|
||||
{
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is readable';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return is_readable($other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
return sprintf(
|
||||
'"%s" is readable',
|
||||
$other
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is readable';
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,52 +7,48 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function is_writable;
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* Constraint that checks if the file/dir(name) that it is evaluated for is writable.
|
||||
*
|
||||
* The file path to check is passed as $other in evaluate().
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsWritable extends PHPUnit_Framework_Constraint
|
||||
final class IsWritable extends Constraint
|
||||
{
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is writable';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return is_writable($other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
return sprintf(
|
||||
'"%s" is writable',
|
||||
$other
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is writable';
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,14 +7,17 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
|
||||
/**
|
||||
* Constraint that accepts any input value.
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsAnything extends PHPUnit_Framework_Constraint
|
||||
final class IsAnything extends Constraint
|
||||
{
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other
|
||||
* Evaluates the constraint for parameter $other.
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
@@ -23,35 +26,25 @@ class PHPUnit_Framework_Constraint_IsAnything extends PHPUnit_Framework_Constrai
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
* @param string $description Additional information about the test
|
||||
* @param bool $returnResult Whether to return a result or throw an exception
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws PHPUnit_Framework_ExpectationFailedException
|
||||
* @throws ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, $description = '', $returnResult = false)
|
||||
public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
|
||||
{
|
||||
return $returnResult ? true : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is anything';
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of constraint elements.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
public function count(): int
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,177 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constraint that checks if one value is equal to another.
|
||||
*
|
||||
* Equality is checked with PHP's == operator, the operator is explained in
|
||||
* detail at {@url http://www.php.net/manual/en/types.comparisons.php}.
|
||||
* Two values are equal if they have the same value disregarding type.
|
||||
*
|
||||
* The expected value is passed in the constructor.
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsEqual extends PHPUnit_Framework_Constraint
|
||||
{
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
protected $value;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
protected $delta = 0.0;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $maxDepth = 10;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $canonicalize = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $ignoreCase = false;
|
||||
|
||||
/**
|
||||
* @var SebastianBergmann\Comparator\ComparisonFailure
|
||||
*/
|
||||
protected $lastFailure;
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
* @param float $delta
|
||||
* @param int $maxDepth
|
||||
* @param bool $canonicalize
|
||||
* @param bool $ignoreCase
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if (!is_numeric($delta)) {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'numeric');
|
||||
}
|
||||
|
||||
if (!is_int($maxDepth)) {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(3, 'integer');
|
||||
}
|
||||
|
||||
if (!is_bool($canonicalize)) {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(4, 'boolean');
|
||||
}
|
||||
|
||||
if (!is_bool($ignoreCase)) {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(5, 'boolean');
|
||||
}
|
||||
|
||||
$this->value = $value;
|
||||
$this->delta = $delta;
|
||||
$this->maxDepth = $maxDepth;
|
||||
$this->canonicalize = $canonicalize;
|
||||
$this->ignoreCase = $ignoreCase;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
*
|
||||
* If $returnResult is true, the result of the evaluation is returned as
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
* @param string $description Additional information about the test
|
||||
* @param bool $returnResult Whether to return a result or throw an exception
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws PHPUnit_Framework_ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, $description = '', $returnResult = false)
|
||||
{
|
||||
// If $this->value and $other are identical, they are also equal.
|
||||
// This is the most common path and will allow us to skip
|
||||
// initialization of all the comparators.
|
||||
if ($this->value === $other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$comparatorFactory = SebastianBergmann\Comparator\Factory::getInstance();
|
||||
|
||||
try {
|
||||
$comparator = $comparatorFactory->getComparatorFor(
|
||||
$this->value,
|
||||
$other
|
||||
);
|
||||
|
||||
$comparator->assertEquals(
|
||||
$this->value,
|
||||
$other,
|
||||
$this->delta,
|
||||
$this->canonicalize,
|
||||
$this->ignoreCase
|
||||
);
|
||||
} catch (SebastianBergmann\Comparator\ComparisonFailure $f) {
|
||||
if ($returnResult) {
|
||||
return false;
|
||||
}
|
||||
|
||||
throw new PHPUnit_Framework_ExpectationFailedException(
|
||||
trim($description . "\n" . $f->getMessage()),
|
||||
$f
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
$delta = '';
|
||||
|
||||
if (is_string($this->value)) {
|
||||
if (strpos($this->value, "\n") !== false) {
|
||||
return 'is equal to <text>';
|
||||
} else {
|
||||
return sprintf(
|
||||
'is equal to <string:%s>',
|
||||
$this->value
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if ($this->delta != 0) {
|
||||
$delta = sprintf(
|
||||
' with delta <%F>',
|
||||
$this->delta
|
||||
);
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'is equal to %s%s',
|
||||
$this->exporter->export($this->value),
|
||||
$delta
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,41 +7,33 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function get_class;
|
||||
use function is_array;
|
||||
use function is_object;
|
||||
use function is_string;
|
||||
use function sprintf;
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
use SebastianBergmann\Comparator\ComparisonFailure;
|
||||
|
||||
/**
|
||||
* Constraint that asserts that one value is identical to another.
|
||||
*
|
||||
* Identical check is performed with PHP's === operator, the operator is
|
||||
* explained in detail at
|
||||
* {@url http://www.php.net/manual/en/types.comparisons.php}.
|
||||
* Two values are identical if they have the same value and are of the same
|
||||
* type.
|
||||
*
|
||||
* The expected value is passed in the constructor.
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsIdentical extends PHPUnit_Framework_Constraint
|
||||
final class IsIdentical extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
const EPSILON = 0.0000000001;
|
||||
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
protected $value;
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other
|
||||
* Evaluates the constraint for parameter $other.
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
@@ -50,23 +42,12 @@ class PHPUnit_Framework_Constraint_IsIdentical extends PHPUnit_Framework_Constra
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
* @param string $description Additional information about the test
|
||||
* @param bool $returnResult Whether to return a result or throw an exception
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws PHPUnit_Framework_ExpectationFailedException
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
* @throws ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, $description = '', $returnResult = false)
|
||||
public function evaluate($other, string $description = '', bool $returnResult = false): ?bool
|
||||
{
|
||||
if (is_float($this->value) && is_float($other) &&
|
||||
!is_infinite($this->value) && !is_infinite($other) &&
|
||||
!is_nan($this->value) && !is_nan($other)) {
|
||||
$success = abs($this->value - $other) < self::EPSILON;
|
||||
} else {
|
||||
$success = $this->value === $other;
|
||||
}
|
||||
$success = $this->value === $other;
|
||||
|
||||
if ($returnResult) {
|
||||
return $success;
|
||||
@@ -77,29 +58,56 @@ class PHPUnit_Framework_Constraint_IsIdentical extends PHPUnit_Framework_Constra
|
||||
|
||||
// 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),
|
||||
sprintf("'%s'", $other)
|
||||
);
|
||||
}
|
||||
|
||||
// if both values are array, make sure a diff is generated
|
||||
if (is_array($this->value) && is_array($other)) {
|
||||
$f = new ComparisonFailure(
|
||||
$this->value,
|
||||
$other
|
||||
$other,
|
||||
$this->exporter()->export($this->value),
|
||||
$this->exporter()->export($other)
|
||||
);
|
||||
}
|
||||
|
||||
$this->fail($other, $description, $f);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
if (is_object($this->value)) {
|
||||
return 'is identical to an object of class "' .
|
||||
get_class($this->value) . '"';
|
||||
}
|
||||
|
||||
return 'is identical to ' . $this->exporter()->export($this->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
* @param mixed $other evaluated value or object
|
||||
*
|
||||
* @return string
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
if (is_object($this->value) && is_object($other)) {
|
||||
return 'two variables reference the same object';
|
||||
@@ -109,22 +117,10 @@ class PHPUnit_Framework_Constraint_IsIdentical extends PHPUnit_Framework_Constra
|
||||
return 'two strings are identical';
|
||||
}
|
||||
|
||||
if (is_array($this->value) && is_array($other)) {
|
||||
return 'two arrays are identical';
|
||||
}
|
||||
|
||||
return parent::failureDescription($other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
if (is_object($this->value)) {
|
||||
return 'is identical to an object of class "' .
|
||||
get_class($this->value) . '"';
|
||||
} else {
|
||||
return 'is identical to ' .
|
||||
$this->exporter->export($this->value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,141 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constraint that asserts that the value it is evaluated for is of a
|
||||
* specified type.
|
||||
*
|
||||
* The expected value is passed in the constructor.
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsType extends PHPUnit_Framework_Constraint
|
||||
{
|
||||
const TYPE_ARRAY = 'array';
|
||||
const TYPE_BOOL = 'bool';
|
||||
const TYPE_FLOAT = 'float';
|
||||
const TYPE_INT = 'int';
|
||||
const TYPE_NULL = 'null';
|
||||
const TYPE_NUMERIC = 'numeric';
|
||||
const TYPE_OBJECT = 'object';
|
||||
const TYPE_RESOURCE = 'resource';
|
||||
const TYPE_STRING = 'string';
|
||||
const TYPE_SCALAR = 'scalar';
|
||||
const TYPE_CALLABLE = 'callable';
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $types = [
|
||||
'array' => true,
|
||||
'boolean' => true,
|
||||
'bool' => true,
|
||||
'double' => true,
|
||||
'float' => true,
|
||||
'integer' => true,
|
||||
'int' => true,
|
||||
'null' => true,
|
||||
'numeric' => true,
|
||||
'object' => true,
|
||||
'real' => true,
|
||||
'resource' => true,
|
||||
'string' => true,
|
||||
'scalar' => true,
|
||||
'callable' => true
|
||||
];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($type)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if (!isset($this->types[$type])) {
|
||||
throw new PHPUnit_Framework_Exception(
|
||||
sprintf(
|
||||
'Type specified for PHPUnit_Framework_Constraint_IsType <%s> ' .
|
||||
'is not a valid type.',
|
||||
$type
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
{
|
||||
switch ($this->type) {
|
||||
case 'numeric':
|
||||
return is_numeric($other);
|
||||
|
||||
case 'integer':
|
||||
case 'int':
|
||||
return is_int($other);
|
||||
|
||||
case 'double':
|
||||
case 'float':
|
||||
case 'real':
|
||||
return is_float($other);
|
||||
|
||||
case 'string':
|
||||
return is_string($other);
|
||||
|
||||
case 'boolean':
|
||||
case 'bool':
|
||||
return is_bool($other);
|
||||
|
||||
case 'null':
|
||||
return is_null($other);
|
||||
|
||||
case 'array':
|
||||
return is_array($other);
|
||||
|
||||
case 'object':
|
||||
return is_object($other);
|
||||
|
||||
case 'resource':
|
||||
return is_resource($other) || is_string(@get_resource_type($other));
|
||||
|
||||
case 'scalar':
|
||||
return is_scalar($other);
|
||||
|
||||
case 'callable':
|
||||
return is_callable($other);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return sprintf(
|
||||
'is of type "%s"',
|
||||
$this->type
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,26 +7,38 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function json_decode;
|
||||
use function sprintf;
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
use PHPUnit\Util\Json;
|
||||
use SebastianBergmann\Comparator\ComparisonFailure;
|
||||
|
||||
/**
|
||||
* Asserts whether or not two JSON objects are equal.
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_JsonMatches extends PHPUnit_Framework_Constraint
|
||||
final class JsonMatches extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $value;
|
||||
private $value;
|
||||
|
||||
public function __construct(string $value)
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new constraint.
|
||||
*
|
||||
* @param string $value
|
||||
* Returns a string representation of the object.
|
||||
*/
|
||||
public function __construct($value)
|
||||
public function toString(): string
|
||||
{
|
||||
parent::__construct();
|
||||
$this->value = $value;
|
||||
return sprintf(
|
||||
'matches JSON string "%s"',
|
||||
$this->value
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -35,35 +47,63 @@ class PHPUnit_Framework_Constraint_JsonMatches extends PHPUnit_Framework_Constra
|
||||
*
|
||||
* This method can be overridden to implement the evaluation algorithm.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
$decodedOther = json_decode($other);
|
||||
if (json_last_error()) {
|
||||
[$error, $recodedOther] = Json::canonicalize($other);
|
||||
|
||||
if ($error) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$decodedValue = json_decode($this->value);
|
||||
if (json_last_error()) {
|
||||
[$error, $recodedValue] = Json::canonicalize($this->value);
|
||||
|
||||
if ($error) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $decodedOther == $decodedValue;
|
||||
return $recodedOther == $recodedValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the object.
|
||||
* Throws an exception for the given compared value and test description.
|
||||
*
|
||||
* @return string
|
||||
* @param mixed $other evaluated value or object
|
||||
* @param string $description Additional information about the test
|
||||
* @param ComparisonFailure $comparisonFailure
|
||||
*
|
||||
* @throws \PHPUnit\Framework\Exception
|
||||
* @throws \SebastianBergmann\RecursionContext\InvalidArgumentException
|
||||
* @throws ExpectationFailedException
|
||||
*
|
||||
* @psalm-return never-return
|
||||
*/
|
||||
public function toString()
|
||||
protected function fail($other, $description, ComparisonFailure $comparisonFailure = null): void
|
||||
{
|
||||
return sprintf(
|
||||
'matches JSON string "%s"',
|
||||
$this->value
|
||||
);
|
||||
if ($comparisonFailure === null) {
|
||||
[$error, $recodedOther] = Json::canonicalize($other);
|
||||
|
||||
if ($error) {
|
||||
parent::fail($other, $description);
|
||||
}
|
||||
|
||||
[$error, $recodedValue] = Json::canonicalize($this->value);
|
||||
|
||||
if ($error) {
|
||||
parent::fail($other, $description);
|
||||
}
|
||||
|
||||
$comparisonFailure = new ComparisonFailure(
|
||||
json_decode($this->value),
|
||||
json_decode($other),
|
||||
Json::prettify($recodedValue),
|
||||
Json::prettify($recodedOther),
|
||||
false,
|
||||
'Failed asserting that two json values are equal.'
|
||||
);
|
||||
}
|
||||
|
||||
parent::fail($other, $description, $comparisonFailure);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,25 +7,29 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use const JSON_ERROR_CTRL_CHAR;
|
||||
use const JSON_ERROR_DEPTH;
|
||||
use const JSON_ERROR_NONE;
|
||||
use const JSON_ERROR_STATE_MISMATCH;
|
||||
use const JSON_ERROR_SYNTAX;
|
||||
use const JSON_ERROR_UTF8;
|
||||
use function strtolower;
|
||||
|
||||
/**
|
||||
* Provides human readable messages for each JSON error.
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider
|
||||
final class JsonMatchesErrorMessageProvider
|
||||
{
|
||||
/**
|
||||
* Translates JSON error to a human readable string.
|
||||
*
|
||||
* @param string $error
|
||||
* @param string $prefix
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function determineJsonError($error, $prefix = '')
|
||||
public static function determineJsonError(string $error, string $prefix = ''): ?string
|
||||
{
|
||||
switch ($error) {
|
||||
case JSON_ERROR_NONE:
|
||||
return;
|
||||
return null;
|
||||
case JSON_ERROR_DEPTH:
|
||||
return $prefix . 'Maximum stack depth exceeded';
|
||||
case JSON_ERROR_STATE_MISMATCH:
|
||||
@@ -36,6 +40,7 @@ class PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider
|
||||
return $prefix . 'Syntax error, malformed JSON';
|
||||
case JSON_ERROR_UTF8:
|
||||
return $prefix . 'Malformed UTF-8 characters, possibly incorrectly encoded';
|
||||
|
||||
default:
|
||||
return $prefix . 'Unknown error';
|
||||
}
|
||||
@@ -43,22 +48,22 @@ class PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider
|
||||
|
||||
/**
|
||||
* Translates a given type to a human readable message prefix.
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function translateTypeToPrefix($type)
|
||||
public static function translateTypeToPrefix(string $type): string
|
||||
{
|
||||
switch (strtolower($type)) {
|
||||
case 'expected':
|
||||
$prefix = 'Expected value JSON decode error - ';
|
||||
|
||||
break;
|
||||
case 'actual':
|
||||
$prefix = 'Actual value JSON decode error - ';
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
$prefix = '';
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,32 +7,31 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function is_finite;
|
||||
|
||||
/**
|
||||
* Constraint that accepts finite.
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsFinite extends PHPUnit_Framework_Constraint
|
||||
final class IsFinite extends Constraint
|
||||
{
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is finite';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return is_finite($other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is finite';
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,32 +7,31 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function is_infinite;
|
||||
|
||||
/**
|
||||
* Constraint that accepts infinite.
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsInfinite extends PHPUnit_Framework_Constraint
|
||||
final class IsInfinite extends Constraint
|
||||
{
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is infinite';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return is_infinite($other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is infinite';
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
@@ -7,32 +7,31 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function is_nan;
|
||||
|
||||
/**
|
||||
* Constraint that accepts nan.
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsNan extends PHPUnit_Framework_Constraint
|
||||
final class IsNan extends Constraint
|
||||
{
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return 'is nan';
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other)
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return is_nan($other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is nan';
|
||||
}
|
||||
}
|
||||
@@ -1,156 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Logical NOT.
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_Not extends PHPUnit_Framework_Constraint
|
||||
{
|
||||
/**
|
||||
* @var PHPUnit_Framework_Constraint
|
||||
*/
|
||||
protected $constraint;
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_Constraint $constraint
|
||||
*/
|
||||
public function __construct($constraint)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if (!($constraint instanceof PHPUnit_Framework_Constraint)) {
|
||||
$constraint = new PHPUnit_Framework_Constraint_IsEqual($constraint);
|
||||
}
|
||||
|
||||
$this->constraint = $constraint;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function negate($string)
|
||||
{
|
||||
return str_replace(
|
||||
[
|
||||
'contains ',
|
||||
'exists',
|
||||
'has ',
|
||||
'is ',
|
||||
'are ',
|
||||
'matches ',
|
||||
'starts with ',
|
||||
'ends with ',
|
||||
'reference ',
|
||||
'not not '
|
||||
],
|
||||
[
|
||||
'does not contain ',
|
||||
'does not exist',
|
||||
'does not have ',
|
||||
'is not ',
|
||||
'are not ',
|
||||
'does not match ',
|
||||
'starts not with ',
|
||||
'ends not with ',
|
||||
'don\'t reference ',
|
||||
'not '
|
||||
],
|
||||
$string
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other
|
||||
*
|
||||
* If $returnResult is set to false (the default), an exception is thrown
|
||||
* in case of a failure. null is returned otherwise.
|
||||
*
|
||||
* If $returnResult is true, the result of the evaluation is returned as
|
||||
* a boolean value instead: true in case of success, false in case of a
|
||||
* failure.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
* @param string $description Additional information about the test
|
||||
* @param bool $returnResult Whether to return a result or throw an exception
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws PHPUnit_Framework_ExpectationFailedException
|
||||
*/
|
||||
public function evaluate($other, $description = '', $returnResult = false)
|
||||
{
|
||||
$success = !$this->constraint->evaluate($other, $description, true);
|
||||
|
||||
if ($returnResult) {
|
||||
return $success;
|
||||
}
|
||||
|
||||
if (!$success) {
|
||||
$this->fail($other, $description);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
{
|
||||
switch (get_class($this->constraint)) {
|
||||
case 'PHPUnit_Framework_Constraint_And':
|
||||
case 'PHPUnit_Framework_Constraint_Not':
|
||||
case 'PHPUnit_Framework_Constraint_Or':
|
||||
return 'not( ' . $this->constraint->failureDescription($other) . ' )';
|
||||
|
||||
default:
|
||||
return self::negate(
|
||||
$this->constraint->failureDescription($other)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
switch (get_class($this->constraint)) {
|
||||
case 'PHPUnit_Framework_Constraint_And':
|
||||
case 'PHPUnit_Framework_Constraint_Not':
|
||||
case 'PHPUnit_Framework_Constraint_Or':
|
||||
return 'not( ' . $this->constraint->toString() . ' )';
|
||||
|
||||
default:
|
||||
return self::negate(
|
||||
$this->constraint->toString()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of constraint elements.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return count($this->constraint);
|
||||
}
|
||||
}
|
||||
88
vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php
vendored
Normal file
88
vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function get_class;
|
||||
use function is_object;
|
||||
use function sprintf;
|
||||
use PHPUnit\Framework\Exception;
|
||||
use ReflectionClass;
|
||||
use ReflectionException;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
class ClassHasAttribute extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $attributeName;
|
||||
|
||||
public function __construct(string $attributeName)
|
||||
{
|
||||
$this->attributeName = $attributeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return sprintf(
|
||||
'has attribute "%s"',
|
||||
$this->attributeName
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other): bool
|
||||
{
|
||||
try {
|
||||
return (new ReflectionClass($other))->hasProperty($this->attributeName);
|
||||
// @codeCoverageIgnoreStart
|
||||
} catch (ReflectionException $e) {
|
||||
throw new Exception(
|
||||
$e->getMessage(),
|
||||
$e->getCode(),
|
||||
$e
|
||||
);
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure.
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other evaluated value or object
|
||||
*/
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
return sprintf(
|
||||
'%sclass "%s" %s',
|
||||
is_object($other) ? 'object of ' : '',
|
||||
is_object($other) ? get_class($other) : $other,
|
||||
$this->toString()
|
||||
);
|
||||
}
|
||||
|
||||
protected function attributeName(): string
|
||||
{
|
||||
return $this->attributeName;
|
||||
}
|
||||
}
|
||||
59
vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php
vendored
Normal file
59
vendor/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function sprintf;
|
||||
use PHPUnit\Framework\Exception;
|
||||
use ReflectionClass;
|
||||
use ReflectionException;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class ClassHasStaticAttribute extends ClassHasAttribute
|
||||
{
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return sprintf(
|
||||
'has static attribute "%s"',
|
||||
$this->attributeName()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other): bool
|
||||
{
|
||||
try {
|
||||
$class = new ReflectionClass($other);
|
||||
|
||||
if ($class->hasProperty($this->attributeName())) {
|
||||
return $class->getProperty($this->attributeName())->isStatic();
|
||||
}
|
||||
// @codeCoverageIgnoreStart
|
||||
} catch (ReflectionException $e) {
|
||||
throw new Exception(
|
||||
$e->getMessage(),
|
||||
$e->getCode(),
|
||||
$e
|
||||
);
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
151
vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php
vendored
Normal file
151
vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function get_class;
|
||||
use function is_object;
|
||||
use PHPUnit\Framework\ActualValueIsNotAnObjectException;
|
||||
use PHPUnit\Framework\ComparisonMethodDoesNotAcceptParameterTypeException;
|
||||
use PHPUnit\Framework\ComparisonMethodDoesNotDeclareBoolReturnTypeException;
|
||||
use PHPUnit\Framework\ComparisonMethodDoesNotDeclareExactlyOneParameterException;
|
||||
use PHPUnit\Framework\ComparisonMethodDoesNotDeclareParameterTypeException;
|
||||
use PHPUnit\Framework\ComparisonMethodDoesNotExistException;
|
||||
use ReflectionNamedType;
|
||||
use ReflectionObject;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class ObjectEquals extends Constraint
|
||||
{
|
||||
/**
|
||||
* @var object
|
||||
*/
|
||||
private $expected;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $method;
|
||||
|
||||
public function __construct(object $object, string $method = 'equals')
|
||||
{
|
||||
$this->expected = $object;
|
||||
$this->method = $method;
|
||||
}
|
||||
|
||||
public function toString(): string
|
||||
{
|
||||
return 'two objects are equal';
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ActualValueIsNotAnObjectException
|
||||
* @throws ComparisonMethodDoesNotAcceptParameterTypeException
|
||||
* @throws ComparisonMethodDoesNotDeclareBoolReturnTypeException
|
||||
* @throws ComparisonMethodDoesNotDeclareExactlyOneParameterException
|
||||
* @throws ComparisonMethodDoesNotDeclareParameterTypeException
|
||||
* @throws ComparisonMethodDoesNotExistException
|
||||
*/
|
||||
protected function matches($other): bool
|
||||
{
|
||||
if (!is_object($other)) {
|
||||
throw new ActualValueIsNotAnObjectException;
|
||||
}
|
||||
|
||||
$object = new ReflectionObject($other);
|
||||
|
||||
if (!$object->hasMethod($this->method)) {
|
||||
throw new ComparisonMethodDoesNotExistException(
|
||||
get_class($other),
|
||||
$this->method
|
||||
);
|
||||
}
|
||||
|
||||
/** @noinspection PhpUnhandledExceptionInspection */
|
||||
$method = $object->getMethod($this->method);
|
||||
|
||||
if (!$method->hasReturnType()) {
|
||||
throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException(
|
||||
get_class($other),
|
||||
$this->method
|
||||
);
|
||||
}
|
||||
|
||||
$returnType = $method->getReturnType();
|
||||
|
||||
if (!$returnType instanceof ReflectionNamedType) {
|
||||
throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException(
|
||||
get_class($other),
|
||||
$this->method
|
||||
);
|
||||
}
|
||||
|
||||
if ($returnType->allowsNull()) {
|
||||
throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException(
|
||||
get_class($other),
|
||||
$this->method
|
||||
);
|
||||
}
|
||||
|
||||
if ($returnType->getName() !== 'bool') {
|
||||
throw new ComparisonMethodDoesNotDeclareBoolReturnTypeException(
|
||||
get_class($other),
|
||||
$this->method
|
||||
);
|
||||
}
|
||||
|
||||
if ($method->getNumberOfParameters() !== 1 || $method->getNumberOfRequiredParameters() !== 1) {
|
||||
throw new ComparisonMethodDoesNotDeclareExactlyOneParameterException(
|
||||
get_class($other),
|
||||
$this->method
|
||||
);
|
||||
}
|
||||
|
||||
$parameter = $method->getParameters()[0];
|
||||
|
||||
if (!$parameter->hasType()) {
|
||||
throw new ComparisonMethodDoesNotDeclareParameterTypeException(
|
||||
get_class($other),
|
||||
$this->method
|
||||
);
|
||||
}
|
||||
|
||||
$type = $parameter->getType();
|
||||
|
||||
if (!$type instanceof ReflectionNamedType) {
|
||||
throw new ComparisonMethodDoesNotDeclareParameterTypeException(
|
||||
get_class($other),
|
||||
$this->method
|
||||
);
|
||||
}
|
||||
|
||||
$typeName = $type->getName();
|
||||
|
||||
if ($typeName === 'self') {
|
||||
$typeName = get_class($other);
|
||||
}
|
||||
|
||||
if (!$this->expected instanceof $typeName) {
|
||||
throw new ComparisonMethodDoesNotAcceptParameterTypeException(
|
||||
get_class($other),
|
||||
$this->method,
|
||||
get_class($this->expected)
|
||||
);
|
||||
}
|
||||
|
||||
return $other->{$this->method}($this->expected);
|
||||
}
|
||||
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
return $this->toString();
|
||||
}
|
||||
}
|
||||
29
vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php
vendored
Normal file
29
vendor/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use ReflectionObject;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class ObjectHasAttribute extends ClassHasAttribute
|
||||
{
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other): bool
|
||||
{
|
||||
return (new ReflectionObject($other))->hasProperty($this->attributeName());
|
||||
}
|
||||
}
|
||||
@@ -1,33 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constraint that asserts that the object it is evaluated for has a given
|
||||
* attribute.
|
||||
*
|
||||
* The attribute name is passed in the constructor.
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_ObjectHasAttribute extends PHPUnit_Framework_Constraint_ClassHasAttribute
|
||||
{
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
{
|
||||
$object = new ReflectionObject($other);
|
||||
|
||||
return $object->hasProperty($this->attributeName);
|
||||
}
|
||||
}
|
||||
148
vendor/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php
vendored
Normal file
148
vendor/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
use function array_map;
|
||||
use function array_values;
|
||||
use function count;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
abstract class BinaryOperator extends Operator
|
||||
{
|
||||
/**
|
||||
* @var Constraint[]
|
||||
*/
|
||||
private $constraints = [];
|
||||
|
||||
public static function fromConstraints(Constraint ...$constraints): self
|
||||
{
|
||||
$constraint = new static;
|
||||
|
||||
$constraint->constraints = $constraints;
|
||||
|
||||
return $constraint;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed[] $constraints
|
||||
*/
|
||||
public function setConstraints(array $constraints): void
|
||||
{
|
||||
$this->constraints = array_map(function ($constraint): Constraint
|
||||
{
|
||||
return $this->checkConstraint($constraint);
|
||||
}, array_values($constraints));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of operands (constraints).
|
||||
*/
|
||||
final public function arity(): int
|
||||
{
|
||||
return count($this->constraints);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
$reduced = $this->reduce();
|
||||
|
||||
if ($reduced !== $this) {
|
||||
return $reduced->toString();
|
||||
}
|
||||
|
||||
$text = '';
|
||||
|
||||
foreach ($this->constraints as $key => $constraint) {
|
||||
$constraint = $constraint->reduce();
|
||||
|
||||
$text .= $this->constraintToString($constraint, $key);
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of constraint elements.
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
$count = 0;
|
||||
|
||||
foreach ($this->constraints as $constraint) {
|
||||
$count += count($constraint);
|
||||
}
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the nested constraints.
|
||||
*/
|
||||
final protected function constraints(): array
|
||||
{
|
||||
return $this->constraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the $constraint needs to be wrapped with braces.
|
||||
*/
|
||||
final protected function constraintNeedsParentheses(Constraint $constraint): bool
|
||||
{
|
||||
return $this->arity() > 1 && parent::constraintNeedsParentheses($constraint);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduces the sub-expression starting at $this by skipping degenerate
|
||||
* sub-expression and returns first descendant constraint that starts
|
||||
* a non-reducible sub-expression.
|
||||
*
|
||||
* See Constraint::reduce() for more.
|
||||
*/
|
||||
protected function reduce(): Constraint
|
||||
{
|
||||
if ($this->arity() === 1 && $this->constraints[0] instanceof Operator) {
|
||||
return $this->constraints[0]->reduce();
|
||||
}
|
||||
|
||||
return parent::reduce();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns string representation of given operand in context of this operator.
|
||||
*
|
||||
* @param Constraint $constraint operand constraint
|
||||
* @param int $position position of $constraint in this expression
|
||||
*/
|
||||
private function constraintToString(Constraint $constraint, int $position): string
|
||||
{
|
||||
$prefix = '';
|
||||
|
||||
if ($position > 0) {
|
||||
$prefix = (' ' . $this->operator() . ' ');
|
||||
}
|
||||
|
||||
if ($this->constraintNeedsParentheses($constraint)) {
|
||||
return $prefix . '( ' . $constraint->toString() . ' )';
|
||||
}
|
||||
|
||||
$string = $constraint->toStringInContext($this, $position);
|
||||
|
||||
if ($string === '') {
|
||||
$string = $constraint->toString();
|
||||
}
|
||||
|
||||
return $prefix . $string;
|
||||
}
|
||||
}
|
||||
51
vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php
vendored
Normal file
51
vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of PHPUnit.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace PHPUnit\Framework\Constraint;
|
||||
|
||||
/**
|
||||
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
final class LogicalAnd extends BinaryOperator
|
||||
{
|
||||
/**
|
||||
* Returns the name of this operator.
|
||||
*/
|
||||
public function operator(): string
|
||||
{
|
||||
return 'and';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this operator's precedence.
|
||||
*
|
||||
* @see https://www.php.net/manual/en/language.operators.precedence.php
|
||||
*/
|
||||
public function precedence(): int
|
||||
{
|
||||
return 22;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other value or object to evaluate
|
||||
*/
|
||||
protected function matches($other): bool
|
||||
{
|
||||
foreach ($this->constraints() as $constraint) {
|
||||
if (!$constraint->evaluate($other, '', true)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return [] !== $this->constraints();
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user