update for version 1.0.2
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
|
||||
All notable changes of the PHP_CodeCoverage 2.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [2.2.4] - 2015-10-06
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#391](https://github.com/sebastianbergmann/php-code-coverage/pull/391): Missing `</abbr>` tag
|
||||
|
||||
## [2.2.3] - 2015-09-14
|
||||
|
||||
### Fixed
|
||||
@@ -42,7 +48,8 @@ All notable changes of the PHP_CodeCoverage 2.2 release series are documented in
|
||||
|
||||
* The dedicated driver for HHVM, `PHP_CodeCoverage_Driver_HHVM` has been removed
|
||||
|
||||
[2.2.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.3...2.2.3
|
||||
[2.2.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.3...2.2.4
|
||||
[2.2.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.2...2.2.3
|
||||
[2.2.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.1...2.2.2
|
||||
[2.2.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.0...2.2.1
|
||||
[2.2.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.1...2.2.0
|
||||
|
@@ -58,7 +58,7 @@ abstract class PHP_CodeCoverage_Report_HTML_Renderer
|
||||
*/
|
||||
public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound)
|
||||
{
|
||||
$version = new SebastianBergmann\Version('2.2.3', dirname(dirname(dirname(dirname(__DIR__)))));
|
||||
$version = new SebastianBergmann\Version('2.2.4', dirname(dirname(dirname(dirname(__DIR__)))));
|
||||
|
||||
$this->templatePath = $templatePath;
|
||||
$this->generator = $generator;
|
||||
|
@@ -213,7 +213,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R
|
||||
list($class, $method) = explode('::', $methodName);
|
||||
|
||||
$result['method'] .= sprintf(
|
||||
' <tr><td><a href="%s"><abbr title="%s">%s</a></a></td><td class="text-right">%d%%</td></tr>' . "\n",
|
||||
' <tr><td><a href="%s"><abbr title="%s">%s</abbr></a></td><td class="text-right">%d%%</td></tr>' . "\n",
|
||||
str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']),
|
||||
$methodName,
|
||||
$method,
|
||||
|
@@ -1110,7 +1110,7 @@ class PHPUnit_Framework_MockObject_Generator
|
||||
$methods = array();
|
||||
|
||||
foreach ($class->getMethods() as $method) {
|
||||
if ($method->isPublic() || $method->isAbstract()) {
|
||||
if (($method->isPublic() || $method->isAbstract()) && !in_array($method->getName(), $methods)) {
|
||||
$methods[] = $method->getName();
|
||||
}
|
||||
}
|
||||
|
@@ -183,4 +183,18 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$mock = $this->generator->getMock('SingletonClass', array('doSomething'), array(), '', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* ReflectionClass::getMethods for SoapClient on PHP 5.3 produces PHP Fatal Error
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
public function testGetMockForSoapClientReflectionMethodsDuplication()
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
|
||||
$this->markTestSkipped('Only for PHP < 5.4.0');
|
||||
}
|
||||
|
||||
$mock = $this->generator->getMock('SoapClient', array(), array(), '', false);
|
||||
$this->assertInstanceOf('SoapClient', $mock);
|
||||
}
|
||||
}
|
||||
|
33
code/vendor/phpunit/phpunit/.php_cs
vendored
33
code/vendor/phpunit/phpunit/.php_cs
vendored
@@ -11,33 +11,58 @@ return Symfony\CS\Config\Config::create()
|
||||
->level(\Symfony\CS\FixerInterface::NONE_LEVEL)
|
||||
->fixers(
|
||||
array(
|
||||
'align_double_arrow',
|
||||
'align_equals',
|
||||
'braces',
|
||||
'concat_with_spaces',
|
||||
'duplicate_semicolon',
|
||||
'elseif',
|
||||
'empty_return',
|
||||
'encoding',
|
||||
'eof_ending',
|
||||
'extra_empty_lines',
|
||||
'function_call_space',
|
||||
'function_declaration',
|
||||
'indentation',
|
||||
'join_function',
|
||||
'line_after_namespace',
|
||||
'linefeed',
|
||||
'list_commas',
|
||||
'long_array_syntax',
|
||||
'lowercase_constants',
|
||||
'lowercase_keywords',
|
||||
'method_argument_space',
|
||||
'multiple_use',
|
||||
'namespace_no_leading_whitespace',
|
||||
'no_blank_lines_after_class_opening',
|
||||
'no_empty_lines_after_phpdocs',
|
||||
'parenthesis',
|
||||
'php_closing_tag',
|
||||
'phpdoc_indent',
|
||||
'phpdoc_no_access',
|
||||
'phpdoc_no_empty_return',
|
||||
'phpdoc_no_package',
|
||||
'phpdoc_params',
|
||||
'phpdoc_scalar',
|
||||
'phpdoc_separation',
|
||||
'phpdoc_to_comment',
|
||||
'phpdoc_trim',
|
||||
'phpdoc_types',
|
||||
'phpdoc_var_without_name',
|
||||
'remove_lines_between_uses',
|
||||
'return',
|
||||
'self_accessor',
|
||||
'short_tag',
|
||||
'single_line_after_imports',
|
||||
'single_quote',
|
||||
'spaces_before_semicolon',
|
||||
'spaces_cast',
|
||||
'ternary_spaces',
|
||||
'trailing_spaces',
|
||||
'trim_array_spaces',
|
||||
'unused_use',
|
||||
'whitespacy_lines',
|
||||
'align_double_arrow',
|
||||
'align_equals',
|
||||
'concat_with_spaces'
|
||||
'visibility',
|
||||
'whitespacy_lines'
|
||||
)
|
||||
)
|
||||
->finder($finder);
|
||||
|
2
code/vendor/phpunit/phpunit/.travis.yml
vendored
2
code/vendor/phpunit/phpunit/.travis.yml
vendored
@@ -24,7 +24,7 @@ install:
|
||||
|
||||
script:
|
||||
- ./phpunit
|
||||
- ./phpunit --configuration ./build/travis-ci-fail.xml > /dev/null; if [ $? -eq 0 ]; then echo "SHOULD FAIL"; exit 1; else echo "fail checked"; fi;
|
||||
- ./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.dist
|
||||
- xmllint --noout --schema phpunit.xsd tests/_files/configuration.xml
|
||||
- xmllint --noout --schema phpunit.xsd tests/_files/configuration_empty.xml
|
||||
|
58
code/vendor/phpunit/phpunit/ChangeLog-4.8.md
vendored
58
code/vendor/phpunit/phpunit/ChangeLog-4.8.md
vendored
@@ -2,6 +2,57 @@
|
||||
|
||||
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.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
|
||||
@@ -69,6 +120,13 @@ New PHAR release due to updated dependencies
|
||||
* 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.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
|
||||
|
22
code/vendor/phpunit/phpunit/build.xml
vendored
22
code/vendor/phpunit/phpunit/build.xml
vendored
@@ -42,6 +42,12 @@
|
||||
<arg value="${basedir}/phpunit --version | awk 'BEGIN { ORS = ""; } {print $2}'" />
|
||||
</exec>
|
||||
|
||||
<exec executable="gpg" failonerror="true">
|
||||
<arg value="--armor" />
|
||||
<arg value="--detach-sign" />
|
||||
<arg path="${basedir}/build/phpunit-library-${version}.phar" />
|
||||
</exec>
|
||||
|
||||
<exec executable="gpg" failonerror="true">
|
||||
<arg value="--armor" />
|
||||
<arg value="--detach-sign" />
|
||||
@@ -248,14 +254,26 @@
|
||||
<arg value="${version}" />
|
||||
</exec>
|
||||
|
||||
<exec executable="phpab">
|
||||
<exec executable="${basedir}/build/bin/phpab">
|
||||
<arg value="--all" />
|
||||
<arg value="--static" />
|
||||
<arg value="--once" />
|
||||
<arg value="--phar" />
|
||||
<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>
|
||||
|
||||
<exec executable="${basedir}/build/bin/phpab">
|
||||
<arg value="--all" />
|
||||
<arg value="--static" />
|
||||
<arg value="--phar" />
|
||||
<arg value="--output" />
|
||||
<arg path="${basedir}/build/phpunit-${_version}.phar" />
|
||||
<arg value="--template" />
|
||||
<arg path="${basedir}/build/phar-autoload.php.in" />
|
||||
<arg path="${basedir}/build/binary-phar-autoload.php.in" />
|
||||
<arg path="${basedir}/build/phar" />
|
||||
</exec>
|
||||
|
||||
|
@@ -1,37 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
if (__FILE__ == realpath($GLOBALS['_SERVER']['SCRIPT_NAME'])) {
|
||||
$phar = realpath($GLOBALS['_SERVER']['SCRIPT_NAME']);
|
||||
$execute = true;
|
||||
} else {
|
||||
$files = get_included_files();
|
||||
$phar = $files[0];
|
||||
$execute = false;
|
||||
}
|
||||
|
||||
define('__PHPUNIT_PHAR__', str_replace(DIRECTORY_SEPARATOR, '/', $phar));
|
||||
define('__PHPUNIT_PHAR_ROOT__', 'phar://___PHAR___');
|
||||
|
||||
Phar::mapPhar('___PHAR___');
|
||||
|
||||
___FILELIST___
|
||||
|
||||
if ($execute) {
|
||||
if (version_compare('5.3.3', PHP_VERSION, '>')) {
|
||||
fwrite(
|
||||
STDERR,
|
||||
'This version of PHPUnit requires PHP 5.3.3; using the latest version of PHP is highly recommended.' . PHP_EOL
|
||||
);
|
||||
|
||||
die(1);
|
||||
}
|
||||
|
||||
if (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == '--manifest') {
|
||||
print file_get_contents(__PHPUNIT_PHAR_ROOT__ . '/phar/manifest.txt');
|
||||
exit;
|
||||
}
|
||||
|
||||
PHPUnit_TextUI_Command::main();
|
||||
}
|
||||
|
||||
__HALT_COMPILER();
|
@@ -14,6 +14,7 @@
|
||||
* 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>
|
||||
|
@@ -50,7 +50,8 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit
|
||||
/**
|
||||
* Constructs a test case with the given filename.
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $filename
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($filename)
|
||||
@@ -84,7 +85,8 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit
|
||||
/**
|
||||
* Runs a test and collects its result in a TestResult instance.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*/
|
||||
public function run(PHPUnit_Framework_TestResult $result = null)
|
||||
@@ -177,6 +179,7 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
private function parse()
|
||||
@@ -205,7 +208,8 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $code
|
||||
* @param string $code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function render($code)
|
||||
@@ -227,6 +231,7 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit
|
||||
* Parse --INI-- section key value pairs and return as array.
|
||||
*
|
||||
* @param string
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function parseIniSection($content)
|
||||
|
@@ -18,7 +18,8 @@ class PHPUnit_Extensions_PhptTestSuite extends PHPUnit_Framework_TestSuite
|
||||
/**
|
||||
* Constructs a new TestSuite for .phpt test cases.
|
||||
*
|
||||
* @param string $directory
|
||||
* @param string $directory
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($directory)
|
||||
|
@@ -26,9 +26,10 @@ class PHPUnit_Extensions_RepeatedTest extends PHPUnit_Extensions_TestDecorator
|
||||
protected $timesRepeat = 1;
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param int $timesRepeat
|
||||
* @param bool $processIsolation
|
||||
* @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)
|
||||
@@ -63,8 +64,10 @@ class PHPUnit_Extensions_RepeatedTest extends PHPUnit_Extensions_TestDecorator
|
||||
* Runs the decorated test and collects the
|
||||
* result in a TestResult.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function run(PHPUnit_Framework_TestResult $result = null)
|
||||
|
@@ -92,7 +92,8 @@ class PHPUnit_Extensions_TestDecorator extends PHPUnit_Framework_Assert implemen
|
||||
* Runs the decorated test and collects the
|
||||
* result in a TestResult.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*/
|
||||
public function run(PHPUnit_Framework_TestResult $result = null)
|
||||
|
@@ -64,6 +64,7 @@ abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_Te
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
@@ -76,6 +77,7 @@ abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_Te
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
@@ -86,6 +88,7 @@ abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_Te
|
||||
* A test suite started.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
@@ -96,6 +99,7 @@ abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_Te
|
||||
* A test suite ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
@@ -184,7 +188,8 @@ abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_Te
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $ticketId
|
||||
* @param mixed $ticketId
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
abstract protected function getTicketInfo($ticketId = null);
|
||||
|
271
code/vendor/phpunit/phpunit/src/Framework/Assert.php
vendored
271
code/vendor/phpunit/phpunit/src/Framework/Assert.php
vendored
@@ -26,6 +26,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $key
|
||||
* @param array|ArrayAccess $array
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function assertArrayHasKey($key, $array, $message = '')
|
||||
@@ -56,6 +57,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param array|ArrayAccess $array
|
||||
* @param bool $strict Check for object identity
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 4.4.0
|
||||
*/
|
||||
public static function assertArraySubset($subset, $array, $strict = false, $message = '')
|
||||
@@ -85,6 +87,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $key
|
||||
* @param array|ArrayAccess $array
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function assertArrayNotHasKey($key, $array, $message = '')
|
||||
@@ -119,6 +122,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param bool $ignoreCase
|
||||
* @param bool $checkForObjectIdentity
|
||||
* @param bool $checkForNonObjectIdentity
|
||||
*
|
||||
* @since Method available since Release 2.1.0
|
||||
*/
|
||||
public static function assertContains($needle, $haystack, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
|
||||
@@ -163,6 +167,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param bool $ignoreCase
|
||||
* @param bool $checkForObjectIdentity
|
||||
* @param bool $checkForNonObjectIdentity
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function assertAttributeContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
|
||||
@@ -186,6 +191,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param bool $ignoreCase
|
||||
* @param bool $checkForObjectIdentity
|
||||
* @param bool $checkForNonObjectIdentity
|
||||
*
|
||||
* @since Method available since Release 2.1.0
|
||||
*/
|
||||
public static function assertNotContains($needle, $haystack, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
|
||||
@@ -234,6 +240,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param bool $ignoreCase
|
||||
* @param bool $checkForObjectIdentity
|
||||
* @param bool $checkForNonObjectIdentity
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function assertAttributeNotContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
|
||||
@@ -255,6 +262,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $haystack
|
||||
* @param bool $isNativeType
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.4
|
||||
*/
|
||||
public static function assertContainsOnly($type, $haystack, $isNativeType = null, $message = '')
|
||||
@@ -317,6 +325,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $haystackClassOrObject
|
||||
* @param bool $isNativeType
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.4
|
||||
*/
|
||||
public static function assertAttributeContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = null, $message = '')
|
||||
@@ -336,6 +345,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $haystack
|
||||
* @param bool $isNativeType
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.4
|
||||
*/
|
||||
public static function assertNotContainsOnly($type, $haystack, $isNativeType = null, $message = '')
|
||||
@@ -374,6 +384,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $haystackClassOrObject
|
||||
* @param bool $isNativeType
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.4
|
||||
*/
|
||||
public static function assertAttributeNotContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = null, $message = '')
|
||||
@@ -420,6 +431,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $haystackAttributeName
|
||||
* @param mixed $haystackClassOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public static function assertAttributeCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
|
||||
@@ -465,6 +477,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $haystackAttributeName
|
||||
* @param mixed $haystackClassOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public static function assertAttributeNotCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
|
||||
@@ -535,6 +548,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param int $maxDepth
|
||||
* @param bool $canonicalize
|
||||
* @param bool $ignoreCase
|
||||
*
|
||||
* @since Method available since Release 2.3.0
|
||||
*/
|
||||
public static function assertNotEquals($expected, $actual, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
|
||||
@@ -580,8 +594,9 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Asserts that a variable is empty.
|
||||
*
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
*
|
||||
* @throws PHPUnit_Framework_AssertionFailedError
|
||||
*/
|
||||
public static function assertEmpty($actual, $message = '')
|
||||
@@ -596,6 +611,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $haystackAttributeName
|
||||
* @param mixed $haystackClassOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertAttributeEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
|
||||
@@ -609,8 +625,9 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Asserts that a variable is not empty.
|
||||
*
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
*
|
||||
* @throws PHPUnit_Framework_AssertionFailedError
|
||||
*/
|
||||
public static function assertNotEmpty($actual, $message = '')
|
||||
@@ -625,6 +642,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $haystackAttributeName
|
||||
* @param mixed $haystackClassOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertAttributeNotEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
|
||||
@@ -641,6 +659,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $expected
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertGreaterThan($expected, $actual, $message = '')
|
||||
@@ -655,6 +674,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $actualAttributeName
|
||||
* @param string $actualClassOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertAttributeGreaterThan($expected, $actualAttributeName, $actualClassOrObject, $message = '')
|
||||
@@ -672,6 +692,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $expected
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertGreaterThanOrEqual($expected, $actual, $message = '')
|
||||
@@ -690,6 +711,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $actualAttributeName
|
||||
* @param string $actualClassOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertAttributeGreaterThanOrEqual($expected, $actualAttributeName, $actualClassOrObject, $message = '')
|
||||
@@ -707,6 +729,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $expected
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertLessThan($expected, $actual, $message = '')
|
||||
@@ -721,6 +744,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $actualAttributeName
|
||||
* @param string $actualClassOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertAttributeLessThan($expected, $actualAttributeName, $actualClassOrObject, $message = '')
|
||||
@@ -738,6 +762,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $expected
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertLessThanOrEqual($expected, $actual, $message = '')
|
||||
@@ -752,6 +777,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $actualAttributeName
|
||||
* @param string $actualClassOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertAttributeLessThanOrEqual($expected, $actualAttributeName, $actualClassOrObject, $message = '')
|
||||
@@ -772,6 +798,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $message
|
||||
* @param bool $canonicalize
|
||||
* @param bool $ignoreCase
|
||||
*
|
||||
* @since Method available since Release 3.2.14
|
||||
*/
|
||||
public static function assertFileEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false)
|
||||
@@ -799,6 +826,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $message
|
||||
* @param bool $canonicalize
|
||||
* @param bool $ignoreCase
|
||||
*
|
||||
* @since Method available since Release 3.2.14
|
||||
*/
|
||||
public static function assertFileNotEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false)
|
||||
@@ -826,6 +854,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $message
|
||||
* @param bool $canonicalize
|
||||
* @param bool $ignoreCase
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function assertStringEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false)
|
||||
@@ -852,6 +881,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $message
|
||||
* @param bool $canonicalize
|
||||
* @param bool $ignoreCase
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function assertStringNotEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false)
|
||||
@@ -874,6 +904,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function assertFileExists($filename, $message = '')
|
||||
@@ -892,6 +923,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function assertFileNotExists($filename, $message = '')
|
||||
@@ -910,8 +942,9 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Asserts that a condition is true.
|
||||
*
|
||||
* @param bool $condition
|
||||
* @param string $message
|
||||
* @param bool $condition
|
||||
* @param string $message
|
||||
*
|
||||
* @throws PHPUnit_Framework_AssertionFailedError
|
||||
*/
|
||||
public static function assertTrue($condition, $message = '')
|
||||
@@ -922,8 +955,9 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Asserts that a condition is not true.
|
||||
*
|
||||
* @param bool $condition
|
||||
* @param string $message
|
||||
* @param bool $condition
|
||||
* @param string $message
|
||||
*
|
||||
* @throws PHPUnit_Framework_AssertionFailedError
|
||||
*/
|
||||
public static function assertNotTrue($condition, $message = '')
|
||||
@@ -934,8 +968,9 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Asserts that a condition is false.
|
||||
*
|
||||
* @param bool $condition
|
||||
* @param string $message
|
||||
* @param bool $condition
|
||||
* @param string $message
|
||||
*
|
||||
* @throws PHPUnit_Framework_AssertionFailedError
|
||||
*/
|
||||
public static function assertFalse($condition, $message = '')
|
||||
@@ -946,8 +981,9 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Asserts that a condition is not false.
|
||||
*
|
||||
* @param bool $condition
|
||||
* @param string $message
|
||||
* @param bool $condition
|
||||
* @param string $message
|
||||
*
|
||||
* @throws PHPUnit_Framework_AssertionFailedError
|
||||
*/
|
||||
public static function assertNotFalse($condition, $message = '')
|
||||
@@ -983,6 +1019,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $attributeName
|
||||
* @param string $className
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertClassHasAttribute($attributeName, $className, $message = '')
|
||||
@@ -1012,6 +1049,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $attributeName
|
||||
* @param string $className
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertClassNotHasAttribute($attributeName, $className, $message = '')
|
||||
@@ -1041,6 +1079,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $attributeName
|
||||
* @param string $className
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertClassHasStaticAttribute($attributeName, $className, $message = '')
|
||||
@@ -1070,6 +1109,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $attributeName
|
||||
* @param string $className
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertClassNotHasStaticAttribute($attributeName, $className, $message = '')
|
||||
@@ -1101,6 +1141,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $attributeName
|
||||
* @param object $object
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function assertObjectHasAttribute($attributeName, $object, $message = '')
|
||||
@@ -1130,6 +1171,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $attributeName
|
||||
* @param object $object
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function assertObjectNotHasAttribute($attributeName, $object, $message = '')
|
||||
@@ -1239,6 +1281,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $expected
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertInstanceOf($expected, $actual, $message = '')
|
||||
@@ -1261,6 +1304,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $attributeName
|
||||
* @param mixed $classOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertAttributeInstanceOf($expected, $attributeName, $classOrObject, $message = '')
|
||||
@@ -1278,6 +1322,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $expected
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertNotInstanceOf($expected, $actual, $message = '')
|
||||
@@ -1300,6 +1345,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $attributeName
|
||||
* @param mixed $classOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertAttributeNotInstanceOf($expected, $attributeName, $classOrObject, $message = '')
|
||||
@@ -1317,6 +1363,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $expected
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertInternalType($expected, $actual, $message = '')
|
||||
@@ -1339,6 +1386,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $attributeName
|
||||
* @param mixed $classOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertAttributeInternalType($expected, $attributeName, $classOrObject, $message = '')
|
||||
@@ -1356,6 +1404,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $expected
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertNotInternalType($expected, $actual, $message = '')
|
||||
@@ -1378,6 +1427,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $attributeName
|
||||
* @param mixed $classOrObject
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertAttributeNotInternalType($expected, $attributeName, $classOrObject, $message = '')
|
||||
@@ -1417,6 +1467,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $pattern
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 2.1.0
|
||||
*/
|
||||
public static function assertNotRegExp($pattern, $string, $message = '')
|
||||
@@ -1500,6 +1551,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $format
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertStringMatchesFormat($format, $string, $message = '')
|
||||
@@ -1523,6 +1575,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $format
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertStringNotMatchesFormat($format, $string, $message = '')
|
||||
@@ -1548,6 +1601,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $formatFile
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertStringMatchesFormatFile($formatFile, $string, $message = '')
|
||||
@@ -1571,6 +1625,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $formatFile
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function assertStringNotMatchesFormatFile($formatFile, $string, $message = '')
|
||||
@@ -1596,6 +1651,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $prefix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function assertStringStartsWith($prefix, $string, $message = '')
|
||||
@@ -1621,6 +1677,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $prefix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function assertStringStartsNotWith($prefix, $string, $message = '')
|
||||
@@ -1646,6 +1703,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $suffix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function assertStringEndsWith($suffix, $string, $message = '')
|
||||
@@ -1669,6 +1727,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $suffix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function assertStringEndsNotWith($suffix, $string, $message = '')
|
||||
@@ -1694,6 +1753,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $expectedFile
|
||||
* @param string $actualFile
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertXmlFileEqualsXmlFile($expectedFile, $actualFile, $message = '')
|
||||
@@ -1710,6 +1770,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $expectedFile
|
||||
* @param string $actualFile
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertXmlFileNotEqualsXmlFile($expectedFile, $actualFile, $message = '')
|
||||
@@ -1726,6 +1787,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $expectedFile
|
||||
* @param string $actualXml
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function assertXmlStringEqualsXmlFile($expectedFile, $actualXml, $message = '')
|
||||
@@ -1742,6 +1804,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $expectedFile
|
||||
* @param string $actualXml
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function assertXmlStringNotEqualsXmlFile($expectedFile, $actualXml, $message = '')
|
||||
@@ -1758,6 +1821,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $expectedXml
|
||||
* @param string $actualXml
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertXmlStringEqualsXmlString($expectedXml, $actualXml, $message = '')
|
||||
@@ -1774,6 +1838,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $expectedXml
|
||||
* @param string $actualXml
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, $message = '')
|
||||
@@ -1791,12 +1856,18 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param DOMElement $actualElement
|
||||
* @param bool $checkAttributes
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, $checkAttributes = false, $message = '')
|
||||
{
|
||||
$expectedElement = clone $expectedElement;
|
||||
$actualElement = clone $actualElement;
|
||||
$tmp = new DOMDocument;
|
||||
$expectedElement = $tmp->importNode($expectedElement, true);
|
||||
|
||||
$tmp = new DOMDocument;
|
||||
$actualElement = $tmp->importNode($actualElement, true);
|
||||
|
||||
unset($tmp);
|
||||
|
||||
self::assertEquals(
|
||||
$expectedElement->tagName,
|
||||
@@ -1880,6 +1951,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
* @param bool $isHtml
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
* @deprecated
|
||||
* @codeCoverageIgnore
|
||||
@@ -1908,6 +1980,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
* @param bool $isHtml
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
* @deprecated
|
||||
* @codeCoverageIgnore
|
||||
@@ -1936,6 +2009,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $actual
|
||||
* @param string $message
|
||||
* @param bool $isHtml
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
* @deprecated
|
||||
* @codeCoverageIgnore
|
||||
@@ -2123,6 +2197,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $actual
|
||||
* @param string $message
|
||||
* @param bool $isHtml
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
* @deprecated
|
||||
* @codeCoverageIgnore
|
||||
@@ -2148,6 +2223,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param string $actual
|
||||
* @param string $message
|
||||
* @param bool $isHtml
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
* @deprecated
|
||||
* @codeCoverageIgnore
|
||||
@@ -2169,6 +2245,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* @param mixed $value
|
||||
* @param PHPUnit_Framework_Constraint $constraint
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function assertThat($value, PHPUnit_Framework_Constraint $constraint, $message = '')
|
||||
@@ -2183,6 +2260,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
*
|
||||
* @param string $actualJson
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 3.7.20
|
||||
*/
|
||||
public static function assertJson($actualJson, $message = '')
|
||||
@@ -2338,6 +2416,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_And matcher object.
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_And
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function logicalAnd()
|
||||
@@ -2354,6 +2433,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_Or matcher object.
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_Or
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function logicalOr()
|
||||
@@ -2369,8 +2449,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_Not matcher object.
|
||||
*
|
||||
* @param PHPUnit_Framework_Constraint $constraint
|
||||
* @param PHPUnit_Framework_Constraint $constraint
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_Not
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function logicalNot(PHPUnit_Framework_Constraint $constraint)
|
||||
@@ -2382,6 +2464,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_Xor matcher object.
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_Xor
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function logicalXor()
|
||||
@@ -2398,6 +2481,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_IsAnything matcher object.
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_IsAnything
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function anything()
|
||||
@@ -2409,6 +2493,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_IsTrue
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function isTrue()
|
||||
@@ -2419,7 +2504,8 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_Callback matcher object.
|
||||
*
|
||||
* @param callable $callback
|
||||
* @param callable $callback
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_Callback
|
||||
*/
|
||||
public static function callback($callback)
|
||||
@@ -2431,6 +2517,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_IsFalse matcher object.
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_IsFalse
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function isFalse()
|
||||
@@ -2442,6 +2529,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_IsJson matcher object.
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_IsJson
|
||||
*
|
||||
* @since Method available since Release 3.7.20
|
||||
*/
|
||||
public static function isJson()
|
||||
@@ -2453,6 +2541,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_IsNull matcher object.
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_IsNull
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function isNull()
|
||||
@@ -2463,9 +2552,11 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_Attribute matcher object.
|
||||
*
|
||||
* @param PHPUnit_Framework_Constraint $constraint
|
||||
* @param string $attributeName
|
||||
* @param PHPUnit_Framework_Constraint $constraint
|
||||
* @param string $attributeName
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_Attribute
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function attribute(PHPUnit_Framework_Constraint $constraint, $attributeName)
|
||||
@@ -2480,10 +2571,12 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_TraversableContains matcher
|
||||
* object.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param bool $checkForObjectIdentity
|
||||
* @param bool $checkForNonObjectIdentity
|
||||
* @param mixed $value
|
||||
* @param bool $checkForObjectIdentity
|
||||
* @param bool $checkForNonObjectIdentity
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_TraversableContains
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function contains($value, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
|
||||
@@ -2495,8 +2588,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher
|
||||
* object.
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $type
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_TraversableContainsOnly
|
||||
*
|
||||
* @since Method available since Release 3.1.4
|
||||
*/
|
||||
public static function containsOnly($type)
|
||||
@@ -2508,7 +2603,8 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher
|
||||
* object.
|
||||
*
|
||||
* @param string $classname
|
||||
* @param string $classname
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_TraversableContainsOnly
|
||||
*/
|
||||
public static function containsOnlyInstancesOf($classname)
|
||||
@@ -2519,8 +2615,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_ArrayHasKey matcher object.
|
||||
*
|
||||
* @param mixed $key
|
||||
* @param mixed $key
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_ArrayHasKey
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function arrayHasKey($key)
|
||||
@@ -2531,12 +2629,14 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param float $delta
|
||||
* @param int $maxDepth
|
||||
* @param bool $canonicalize
|
||||
* @param bool $ignoreCase
|
||||
* @param mixed $value
|
||||
* @param float $delta
|
||||
* @param int $maxDepth
|
||||
* @param bool $canonicalize
|
||||
* @param bool $ignoreCase
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_IsEqual
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function equalTo($value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
|
||||
@@ -2555,13 +2655,15 @@ abstract class PHPUnit_Framework_Assert
|
||||
* that is wrapped in a PHPUnit_Framework_Constraint_Attribute matcher
|
||||
* object.
|
||||
*
|
||||
* @param string $attributeName
|
||||
* @param mixed $value
|
||||
* @param float $delta
|
||||
* @param int $maxDepth
|
||||
* @param bool $canonicalize
|
||||
* @param bool $ignoreCase
|
||||
* @param string $attributeName
|
||||
* @param mixed $value
|
||||
* @param float $delta
|
||||
* @param int $maxDepth
|
||||
* @param bool $canonicalize
|
||||
* @param bool $ignoreCase
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_Attribute
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function attributeEqualTo($attributeName, $value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
|
||||
@@ -2582,6 +2684,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_IsEmpty matcher object.
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_IsEmpty
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function isEmpty()
|
||||
@@ -2593,6 +2696,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_FileExists
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function fileExists()
|
||||
@@ -2603,8 +2707,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_GreaterThan matcher object.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_GreaterThan
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function greaterThan($value)
|
||||
@@ -2617,8 +2723,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
* a PHPUnit_Framework_Constraint_IsEqual and a
|
||||
* PHPUnit_Framework_Constraint_GreaterThan matcher object.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_Or
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function greaterThanOrEqual($value)
|
||||
@@ -2632,8 +2740,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_ClassHasAttribute matcher object.
|
||||
*
|
||||
* @param string $attributeName
|
||||
* @param string $attributeName
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_ClassHasAttribute
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function classHasAttribute($attributeName)
|
||||
@@ -2647,8 +2757,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns a PHPUnit_Framework_Constraint_ClassHasStaticAttribute matcher
|
||||
* object.
|
||||
*
|
||||
* @param string $attributeName
|
||||
* @param string $attributeName
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_ClassHasStaticAttribute
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function classHasStaticAttribute($attributeName)
|
||||
@@ -2661,8 +2773,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_ObjectHasAttribute matcher object.
|
||||
*
|
||||
* @param string $attributeName
|
||||
* @param string $attributeName
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_ObjectHasAttribute
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function objectHasAttribute($attributeName)
|
||||
@@ -2675,8 +2789,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_IsIdentical matcher object.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_IsIdentical
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function identicalTo($value)
|
||||
@@ -2687,8 +2803,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_IsInstanceOf matcher object.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $className
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_IsInstanceOf
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function isInstanceOf($className)
|
||||
@@ -2699,8 +2817,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_IsType matcher object.
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $type
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_IsType
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function isType($type)
|
||||
@@ -2711,8 +2831,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_LessThan matcher object.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_LessThan
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function lessThan($value)
|
||||
@@ -2725,8 +2847,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
* a PHPUnit_Framework_Constraint_IsEqual and a
|
||||
* PHPUnit_Framework_Constraint_LessThan matcher object.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_Or
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function lessThanOrEqual($value)
|
||||
@@ -2740,8 +2864,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_PCREMatch matcher object.
|
||||
*
|
||||
* @param string $pattern
|
||||
* @param string $pattern
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_PCREMatch
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function matchesRegularExpression($pattern)
|
||||
@@ -2752,8 +2878,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_StringMatches matcher object.
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $string
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_StringMatches
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public static function matches($string)
|
||||
@@ -2764,8 +2892,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_StringStartsWith matcher object.
|
||||
*
|
||||
* @param mixed $prefix
|
||||
* @param mixed $prefix
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_StringStartsWith
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function stringStartsWith($prefix)
|
||||
@@ -2776,9 +2906,11 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_StringContains matcher object.
|
||||
*
|
||||
* @param string $string
|
||||
* @param bool $case
|
||||
* @param string $string
|
||||
* @param bool $case
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_StringContains
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function stringContains($string, $case = true)
|
||||
@@ -2789,8 +2921,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_StringEndsWith matcher object.
|
||||
*
|
||||
* @param mixed $suffix
|
||||
* @param mixed $suffix
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_StringEndsWith
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function stringEndsWith($suffix)
|
||||
@@ -2801,7 +2935,8 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_Count matcher object.
|
||||
*
|
||||
* @param int $count
|
||||
* @param int $count
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_Count
|
||||
*/
|
||||
public static function countOf($count)
|
||||
@@ -2811,7 +2946,8 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Fails a test with the given message.
|
||||
*
|
||||
* @param string $message
|
||||
* @param string $message
|
||||
*
|
||||
* @throws PHPUnit_Framework_AssertionFailedError
|
||||
*/
|
||||
public static function fail($message = '')
|
||||
@@ -2823,9 +2959,11 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns the value of an attribute of a class or an object.
|
||||
* This also works for attributes that are declared protected or private.
|
||||
*
|
||||
* @param mixed $classOrObject
|
||||
* @param string $attributeName
|
||||
* @param mixed $classOrObject
|
||||
* @param string $attributeName
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public static function readAttribute($classOrObject, $attributeName)
|
||||
@@ -2867,10 +3005,13 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns the value of a static attribute.
|
||||
* This also works for attributes that are declared protected or private.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $attributeName
|
||||
* @param string $className
|
||||
* @param string $attributeName
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public static function getStaticAttribute($className, $attributeName)
|
||||
@@ -2915,10 +3056,13 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Returns the value of an object's attribute.
|
||||
* This also works for attributes that are declared protected or private.
|
||||
*
|
||||
* @param object $object
|
||||
* @param string $attributeName
|
||||
* @param object $object
|
||||
* @param string $attributeName
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public static function getObjectAttribute($object, $attributeName)
|
||||
@@ -2972,8 +3116,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Mark the test as incomplete.
|
||||
*
|
||||
* @param string $message
|
||||
* @param string $message
|
||||
*
|
||||
* @throws PHPUnit_Framework_IncompleteTestError
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function markTestIncomplete($message = '')
|
||||
@@ -2984,8 +3130,10 @@ abstract class PHPUnit_Framework_Assert
|
||||
/**
|
||||
* Mark the test as skipped.
|
||||
*
|
||||
* @param string $message
|
||||
* @param string $message
|
||||
*
|
||||
* @throws PHPUnit_Framework_SkippedTestError
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function markTestSkipped($message = '')
|
||||
@@ -2997,6 +3145,7 @@ abstract class PHPUnit_Framework_Assert
|
||||
* Return the current assertion count.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.3.3
|
||||
*/
|
||||
public static function getCount()
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -11,8 +11,8 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @see PHPUnit_Framework_TestListener for documentation on the API methods.
|
||||
* @since Class available since Release 4.0.0
|
||||
*/
|
||||
abstract class PHPUnit_Framework_BaseTestListener implements PHPUnit_Framework_TestListener
|
||||
|
@@ -34,10 +34,12 @@ abstract class PHPUnit_Framework_Constraint implements Countable, PHPUnit_Framew
|
||||
* 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
|
||||
* @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)
|
||||
@@ -63,7 +65,8 @@ abstract class PHPUnit_Framework_Constraint implements Countable, PHPUnit_Framew
|
||||
*
|
||||
* This method can be overridden to implement the evaluation algorithm.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -75,6 +78,7 @@ abstract class PHPUnit_Framework_Constraint implements Countable, PHPUnit_Framew
|
||||
* Counts the number of constraint elements.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function count()
|
||||
@@ -85,9 +89,10 @@ abstract class PHPUnit_Framework_Constraint implements Countable, PHPUnit_Framew
|
||||
/**
|
||||
* 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
|
||||
* @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)
|
||||
@@ -119,7 +124,8 @@ abstract class PHPUnit_Framework_Constraint implements Countable, PHPUnit_Framew
|
||||
* The function can be overridden to provide additional failure
|
||||
* information like a diff
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function additionalFailureDescription($other)
|
||||
@@ -136,7 +142,8 @@ abstract class PHPUnit_Framework_Constraint implements Countable, PHPUnit_Framew
|
||||
* To provide additional failure information additionalFailureDescription
|
||||
* can be used.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -26,7 +26,8 @@ class PHPUnit_Framework_Constraint_And extends PHPUnit_Framework_Constraint
|
||||
protected $lastConstraint = null;
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_Constraint[] $constraints
|
||||
* @param PHPUnit_Framework_Constraint[] $constraints
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function setConstraints(array $constraints)
|
||||
@@ -55,10 +56,12 @@ class PHPUnit_Framework_Constraint_And extends PHPUnit_Framework_Constraint
|
||||
* 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
|
||||
* @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)
|
||||
@@ -106,6 +109,7 @@ class PHPUnit_Framework_Constraint_And extends PHPUnit_Framework_Constraint
|
||||
* Counts the number of constraint elements.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function count()
|
||||
|
@@ -38,7 +38,8 @@ class PHPUnit_Framework_Constraint_ArrayHasKey extends PHPUnit_Framework_Constra
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -70,7 +71,8 @@ class PHPUnit_Framework_Constraint_ArrayHasKey extends PHPUnit_Framework_Constra
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -43,7 +43,8 @@ class PHPUnit_Framework_Constraint_ArraySubset extends PHPUnit_Framework_Constra
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param array|ArrayAccess $other Array or ArrayAccess object to evaluate.
|
||||
* @param array|ArrayAccess $other Array or ArrayAccess object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -73,7 +74,8 @@ class PHPUnit_Framework_Constraint_ArraySubset extends PHPUnit_Framework_Constra
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -39,10 +39,12 @@ class PHPUnit_Framework_Constraint_Attribute extends PHPUnit_Framework_Constrain
|
||||
* 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
|
||||
* @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)
|
||||
@@ -74,7 +76,8 @@ class PHPUnit_Framework_Constraint_Attribute extends PHPUnit_Framework_Constrain
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -16,7 +16,8 @@ class PHPUnit_Framework_Constraint_Callback extends PHPUnit_Framework_Constraint
|
||||
private $callback;
|
||||
|
||||
/**
|
||||
* @param callable $callback
|
||||
* @param callable $callback
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($callback)
|
||||
@@ -37,7 +38,8 @@ class PHPUnit_Framework_Constraint_Callback extends PHPUnit_Framework_Constraint
|
||||
* 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -36,7 +36,8 @@ class PHPUnit_Framework_Constraint_ClassHasAttribute extends PHPUnit_Framework_C
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -65,7 +66,8 @@ class PHPUnit_Framework_Constraint_ClassHasAttribute extends PHPUnit_Framework_C
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -22,7 +22,8 @@ class PHPUnit_Framework_Constraint_ClassHasStaticAttribute extends PHPUnit_Frame
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -42,6 +43,7 @@ class PHPUnit_Framework_Constraint_ClassHasStaticAttribute extends PHPUnit_Frame
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public function toString()
|
||||
|
@@ -37,10 +37,12 @@ abstract class PHPUnit_Framework_Constraint_Composite extends PHPUnit_Framework_
|
||||
* 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
|
||||
* @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)
|
||||
|
@@ -31,7 +31,8 @@ class PHPUnit_Framework_Constraint_Count extends PHPUnit_Framework_Constraint
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param mixed $other
|
||||
* @param mixed $other
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -40,7 +41,8 @@ class PHPUnit_Framework_Constraint_Count extends PHPUnit_Framework_Constraint
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $other
|
||||
* @param mixed $other
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function getCountOf($other)
|
||||
@@ -76,7 +78,8 @@ 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.
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -31,7 +31,8 @@ class PHPUnit_Framework_Constraint_Exception extends PHPUnit_Framework_Constrain
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -45,7 +46,8 @@ class PHPUnit_Framework_Constraint_Exception extends PHPUnit_Framework_Constrain
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -31,7 +31,8 @@ class PHPUnit_Framework_Constraint_ExceptionCode extends PHPUnit_Framework_Const
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param Exception $other
|
||||
* @param Exception $other
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -45,7 +46,8 @@ class PHPUnit_Framework_Constraint_ExceptionCode extends PHPUnit_Framework_Const
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -31,7 +31,8 @@ class PHPUnit_Framework_Constraint_ExceptionMessage extends PHPUnit_Framework_Co
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param Exception $other
|
||||
* @param Exception $other
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -45,7 +46,8 @@ class PHPUnit_Framework_Constraint_ExceptionMessage extends PHPUnit_Framework_Co
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -31,7 +31,8 @@ class PHPUnit_Framework_Constraint_ExceptionMessageRegExp extends PHPUnit_Framew
|
||||
* Evaluates the constraint for parameter $other. Returns true if the
|
||||
* constraint is met, false otherwise.
|
||||
*
|
||||
* @param Exception $other
|
||||
* @param Exception $other
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -53,7 +54,8 @@ class PHPUnit_Framework_Constraint_ExceptionMessageRegExp extends PHPUnit_Framew
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -21,7 +21,8 @@ class PHPUnit_Framework_Constraint_FileExists extends PHPUnit_Framework_Constrai
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -35,7 +36,8 @@ class PHPUnit_Framework_Constraint_FileExists extends PHPUnit_Framework_Constrai
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -34,7 +34,8 @@ class PHPUnit_Framework_Constraint_GreaterThan extends PHPUnit_Framework_Constra
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -25,10 +25,12 @@ 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
|
||||
* @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)
|
||||
@@ -50,6 +52,7 @@ class PHPUnit_Framework_Constraint_IsAnything extends PHPUnit_Framework_Constrai
|
||||
* Counts the number of constraint elements.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public function count()
|
||||
|
@@ -19,7 +19,8 @@ class PHPUnit_Framework_Constraint_IsEmpty extends PHPUnit_Framework_Constraint
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -47,7 +48,8 @@ class PHPUnit_Framework_Constraint_IsEmpty 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.
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -52,11 +52,12 @@ class PHPUnit_Framework_Constraint_IsEqual extends PHPUnit_Framework_Constraint
|
||||
protected $lastFailure;
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
* @param float $delta
|
||||
* @param int $maxDepth
|
||||
* @param bool $canonicalize
|
||||
* @param bool $ignoreCase
|
||||
* @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)
|
||||
@@ -96,10 +97,12 @@ class PHPUnit_Framework_Constraint_IsEqual extends PHPUnit_Framework_Constraint
|
||||
* 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
|
||||
* @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)
|
||||
|
@@ -19,7 +19,8 @@ class PHPUnit_Framework_Constraint_IsFalse extends PHPUnit_Framework_Constraint
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -52,10 +52,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
|
||||
* @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)
|
||||
@@ -95,7 +97,8 @@ class PHPUnit_Framework_Constraint_IsIdentical extends PHPUnit_Framework_Constra
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -36,7 +36,8 @@ class PHPUnit_Framework_Constraint_IsInstanceOf extends PHPUnit_Framework_Constr
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -50,7 +51,8 @@ class PHPUnit_Framework_Constraint_IsInstanceOf extends PHPUnit_Framework_Constr
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -19,7 +19,8 @@ class PHPUnit_Framework_Constraint_IsJson extends PHPUnit_Framework_Constraint
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -38,7 +39,8 @@ class PHPUnit_Framework_Constraint_IsJson 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.
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -19,7 +19,8 @@ class PHPUnit_Framework_Constraint_IsNull extends PHPUnit_Framework_Constraint
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -19,7 +19,8 @@ class PHPUnit_Framework_Constraint_IsTrue extends PHPUnit_Framework_Constraint
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -57,7 +57,8 @@ class PHPUnit_Framework_Constraint_IsType extends PHPUnit_Framework_Constraint
|
||||
protected $type;
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @param string $type
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($type)
|
||||
@@ -81,7 +82,8 @@ class PHPUnit_Framework_Constraint_IsType extends PHPUnit_Framework_Constraint
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -37,7 +37,8 @@ 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.
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -18,8 +18,9 @@ class PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider
|
||||
/**
|
||||
* Translates JSON error to a human readable string.
|
||||
*
|
||||
* @param string $error
|
||||
* @param string $prefix
|
||||
* @param string $error
|
||||
* @param string $prefix
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function determineJsonError($error, $prefix = '')
|
||||
@@ -45,7 +46,8 @@ class PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider
|
||||
/**
|
||||
* Translates a given type to a human readable message prefix.
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function translateTypeToPrefix($type)
|
||||
|
@@ -34,7 +34,8 @@ class PHPUnit_Framework_Constraint_LessThan extends PHPUnit_Framework_Constraint
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -35,7 +35,8 @@ class PHPUnit_Framework_Constraint_Not extends PHPUnit_Framework_Constraint
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @param string $string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function negate($string)
|
||||
@@ -79,10 +80,12 @@ class PHPUnit_Framework_Constraint_Not extends PHPUnit_Framework_Constraint
|
||||
* 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
|
||||
* @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)
|
||||
@@ -104,7 +107,8 @@ class PHPUnit_Framework_Constraint_Not 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.
|
||||
* @param mixed $other Evaluated value or object.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
@@ -146,6 +150,7 @@ class PHPUnit_Framework_Constraint_Not extends PHPUnit_Framework_Constraint
|
||||
* Counts the number of constraint elements.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function count()
|
||||
|
@@ -22,7 +22,8 @@ class PHPUnit_Framework_Constraint_ObjectHasAttribute extends PHPUnit_Framework_
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -48,10 +48,12 @@ class PHPUnit_Framework_Constraint_Or extends PHPUnit_Framework_Constraint
|
||||
* 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
|
||||
* @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)
|
||||
@@ -99,6 +101,7 @@ class PHPUnit_Framework_Constraint_Or extends PHPUnit_Framework_Constraint
|
||||
* Counts the number of constraint elements.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function count()
|
||||
|
@@ -39,7 +39,8 @@ class PHPUnit_Framework_Constraint_PCREMatch extends PHPUnit_Framework_Constrain
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -47,7 +47,8 @@ class PHPUnit_Framework_Constraint_StringContains extends PHPUnit_Framework_Cons
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -34,7 +34,8 @@ class PHPUnit_Framework_Constraint_StringEndsWith extends PHPUnit_Framework_Cons
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -34,7 +34,8 @@ class PHPUnit_Framework_Constraint_StringStartsWith extends PHPUnit_Framework_Co
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
|
@@ -32,9 +32,10 @@ class PHPUnit_Framework_Constraint_TraversableContains extends PHPUnit_Framework
|
||||
protected $value;
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
* @param bool $checkForObjectIdentity
|
||||
* @param bool $checkForNonObjectIdentity
|
||||
* @param mixed $value
|
||||
* @param bool $checkForObjectIdentity
|
||||
* @param bool $checkForNonObjectIdentity
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($value, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
|
||||
@@ -58,7 +59,8 @@ class PHPUnit_Framework_Constraint_TraversableContains extends PHPUnit_Framework
|
||||
* Evaluates the constraint for parameter $other. 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
|
||||
*/
|
||||
protected function matches($other)
|
||||
@@ -110,7 +112,8 @@ class PHPUnit_Framework_Constraint_TraversableContains extends PHPUnit_Framework
|
||||
* 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
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
|
@@ -55,10 +55,12 @@ class PHPUnit_Framework_Constraint_TraversableContainsOnly extends PHPUnit_Frame
|
||||
* 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
|
||||
* @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)
|
||||
|
@@ -48,10 +48,12 @@ class PHPUnit_Framework_Constraint_Xor extends PHPUnit_Framework_Constraint
|
||||
* 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
|
||||
* @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)
|
||||
@@ -104,6 +106,7 @@ class PHPUnit_Framework_Constraint_Xor extends PHPUnit_Framework_Constraint
|
||||
* Counts the number of constraint elements.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function count()
|
||||
|
@@ -27,7 +27,6 @@
|
||||
* the parent would break the intended encapsulation of process isolation.
|
||||
*
|
||||
* @see http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions
|
||||
*
|
||||
* @since Class available since Release 3.4.0
|
||||
*/
|
||||
class PHPUnit_Framework_Exception extends RuntimeException implements PHPUnit_Exception
|
||||
|
@@ -18,7 +18,8 @@ interface PHPUnit_Framework_Test extends Countable
|
||||
/**
|
||||
* Runs a test and collects its result in a TestResult instance.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*/
|
||||
public function run(PHPUnit_Framework_TestResult $result = null);
|
||||
|
@@ -313,6 +313,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns the annotations for this test.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function getAnnotations()
|
||||
@@ -326,7 +327,8 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
/**
|
||||
* Gets the name of a TestCase.
|
||||
*
|
||||
* @param bool $withDataSet
|
||||
* @param bool $withDataSet
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName($withDataSet = true)
|
||||
@@ -342,6 +344,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns the size of the test.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public function getSize()
|
||||
@@ -354,6 +357,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public function getActualOutput()
|
||||
@@ -367,6 +371,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public function hasOutput()
|
||||
@@ -384,7 +389,9 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @param string $expectedRegex
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function expectOutputRegex($expectedRegex)
|
||||
@@ -400,6 +407,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @param string $expectedString
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public function expectOutputString($expectedString)
|
||||
@@ -415,6 +423,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.6.5
|
||||
* @deprecated
|
||||
*/
|
||||
@@ -425,6 +434,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.3.3
|
||||
*/
|
||||
public function hasExpectationOnOutput()
|
||||
@@ -434,6 +444,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.2.0
|
||||
*/
|
||||
public function getExpectedException()
|
||||
@@ -445,6 +456,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* @param mixed $exceptionName
|
||||
* @param string $exceptionMessage
|
||||
* @param int $exceptionCode
|
||||
*
|
||||
* @since Method available since Release 3.2.0
|
||||
*/
|
||||
public function setExpectedException($exceptionName, $exceptionMessage = '', $exceptionCode = null)
|
||||
@@ -458,6 +470,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* @param mixed $exceptionName
|
||||
* @param string $exceptionMessageRegExp
|
||||
* @param int $exceptionCode
|
||||
*
|
||||
* @since Method available since Release 4.3.0
|
||||
*/
|
||||
public function setExpectedExceptionRegExp($exceptionName, $exceptionMessageRegExp = '', $exceptionCode = null)
|
||||
@@ -499,6 +512,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @param bool $useErrorHandler
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function setUseErrorHandler($useErrorHandler)
|
||||
@@ -547,6 +561,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns the status of this test.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public function getStatus()
|
||||
@@ -558,6 +573,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns the status message of this test.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public function getStatusMessage()
|
||||
@@ -569,6 +585,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns whether or not this test has failed.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function hasFailed()
|
||||
@@ -583,8 +600,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Runs the test case and collects the results in a TestResult object.
|
||||
* If no TestResult object is passed a new one will be created.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function run(PHPUnit_Framework_TestResult $result = null)
|
||||
@@ -670,6 +689,8 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
$includePath = "'." . $includePath . ".'";
|
||||
$codeCoverageFilter = "'." . $codeCoverageFilter . ".'";
|
||||
|
||||
$configurationFilePath = (isset($GLOBALS['__PHPUNIT_CONFIGURATION_FILE']) ? $GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] : '');
|
||||
|
||||
$template->setVar(
|
||||
array(
|
||||
'composerAutoload' => $composerAutoload,
|
||||
@@ -690,7 +711,8 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
'isStrictAboutOutputDuringTests' => $isStrictAboutOutputDuringTests,
|
||||
'isStrictAboutTestSize' => $isStrictAboutTestSize,
|
||||
'isStrictAboutTodoAnnotatedTests' => $isStrictAboutTodoAnnotatedTests,
|
||||
'codeCoverageFilter' => $codeCoverageFilter
|
||||
'codeCoverageFilter' => $codeCoverageFilter,
|
||||
'configurationFilePath' => $configurationFilePath
|
||||
)
|
||||
);
|
||||
|
||||
@@ -848,6 +870,11 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
$e = new PHPUnit_Framework_AssertionFailedError($e->getMessage());
|
||||
}
|
||||
|
||||
if (!$e instanceof Exception) {
|
||||
// Rethrow Error directly on PHP 7 as onNotSuccessfulTest does not support it
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$this->onNotSuccessfulTest($e);
|
||||
}
|
||||
}
|
||||
@@ -856,6 +883,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Override to run the test and assert its state.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws Exception|PHPUnit_Framework_Exception
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
@@ -1010,6 +1038,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Sets the dependencies of a TestCase.
|
||||
*
|
||||
* @param array $dependencies
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function setDependencies(array $dependencies)
|
||||
@@ -1021,6 +1050,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns true if the tests has dependencies
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function hasDependencies()
|
||||
@@ -1032,6 +1062,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Sets
|
||||
*
|
||||
* @param array $dependencyInput
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function setDependencyInput(array $dependencyInput)
|
||||
@@ -1041,6 +1072,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @param bool $disallowChangesToGlobalState
|
||||
*
|
||||
* @since Method available since Release 4.6.0
|
||||
*/
|
||||
public function setDisallowChangesToGlobalState($disallowChangesToGlobalState)
|
||||
@@ -1052,6 +1084,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Calling this method in setUp() has no effect!
|
||||
*
|
||||
* @param bool $backupGlobals
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public function setBackupGlobals($backupGlobals)
|
||||
@@ -1065,6 +1098,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Calling this method in setUp() has no effect!
|
||||
*
|
||||
* @param bool $backupStaticAttributes
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function setBackupStaticAttributes($backupStaticAttributes)
|
||||
@@ -1076,8 +1110,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $runTestInSeparateProcess
|
||||
* @param bool $runTestInSeparateProcess
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function setRunTestInSeparateProcess($runTestInSeparateProcess)
|
||||
@@ -1092,8 +1128,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $preserveGlobalState
|
||||
* @param bool $preserveGlobalState
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function setPreserveGlobalState($preserveGlobalState)
|
||||
@@ -1106,8 +1144,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $inIsolation
|
||||
* @param bool $inIsolation
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function setInIsolation($inIsolation)
|
||||
@@ -1121,6 +1161,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.3.0
|
||||
*/
|
||||
public function isInIsolation()
|
||||
@@ -1130,6 +1171,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function getResult()
|
||||
@@ -1139,6 +1181,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @param mixed $result
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function setResult($result)
|
||||
@@ -1147,8 +1190,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param callable $callback
|
||||
* @param callable $callback
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public function setOutputCallback($callback)
|
||||
@@ -1162,6 +1207,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*
|
||||
* @since Method available since Release 3.5.7
|
||||
*/
|
||||
public function getTestResultObject()
|
||||
@@ -1171,6 +1217,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public function setTestResultObject(PHPUnit_Framework_TestResult $result)
|
||||
@@ -1183,9 +1230,11 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* resets the modified php.ini setting to its original value after the
|
||||
* test is run.
|
||||
*
|
||||
* @param string $varName
|
||||
* @param string $newValue
|
||||
* @param string $varName
|
||||
* @param string $newValue
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
protected function iniSet($varName, $newValue)
|
||||
@@ -1213,9 +1262,11 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* This method is a wrapper for the setlocale() function that automatically
|
||||
* resets the locale to its original value after the test is run.
|
||||
*
|
||||
* @param int $category
|
||||
* @param string $locale
|
||||
* @param int $category
|
||||
* @param string $locale
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
protected function setLocale()
|
||||
@@ -1261,20 +1312,23 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
/**
|
||||
* Returns a mock object for the specified class.
|
||||
*
|
||||
* @param string $originalClassName Name of the class to mock.
|
||||
* @param array|null $methods When provided, only methods whose names are in the array
|
||||
* are replaced with a configurable test double. The behavior
|
||||
* of the other methods is not changed.
|
||||
* Providing null means that no methods will be replaced.
|
||||
* @param array $arguments Parameters to pass to the original class' constructor.
|
||||
* @param string $mockClassName Class name for the generated test double class.
|
||||
* @param bool $callOriginalConstructor Can be used to disable the call to the original class' constructor.
|
||||
* @param bool $callOriginalClone Can be used to disable the call to the original class' clone constructor.
|
||||
* @param bool $callAutoload Can be used to disable __autoload() during the generation of the test double class.
|
||||
* @param bool $cloneArguments
|
||||
* @param bool $callOriginalMethods
|
||||
* @param string $originalClassName Name of the class to mock.
|
||||
* @param array|null $methods When provided, only methods whose names are in the array
|
||||
* are replaced with a configurable test double. The behavior
|
||||
* of the other methods is not changed.
|
||||
* Providing null means that no methods will be replaced.
|
||||
* @param array $arguments Parameters to pass to the original class' constructor.
|
||||
* @param string $mockClassName Class name for the generated test double class.
|
||||
* @param bool $callOriginalConstructor Can be used to disable the call to the original class' constructor.
|
||||
* @param bool $callOriginalClone Can be used to disable the call to the original class' clone constructor.
|
||||
* @param bool $callAutoload Can be used to disable __autoload() during the generation of the test double class.
|
||||
* @param bool $cloneArguments
|
||||
* @param bool $callOriginalMethods
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_MockObject
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function getMock($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false, $callOriginalMethods = false)
|
||||
@@ -1299,8 +1353,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
/**
|
||||
* Returns a builder object to create mock objects using a fluent interface.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $className
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_MockBuilder
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public function getMockBuilder($className)
|
||||
@@ -1311,16 +1367,19 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
/**
|
||||
* Mocks the specified class and returns the name of the mocked class.
|
||||
*
|
||||
* @param string $originalClassName
|
||||
* @param array $methods
|
||||
* @param array $arguments
|
||||
* @param string $mockClassName
|
||||
* @param bool $callOriginalConstructor
|
||||
* @param bool $callOriginalClone
|
||||
* @param bool $callAutoload
|
||||
* @param bool $cloneArguments
|
||||
* @param string $originalClassName
|
||||
* @param array $methods
|
||||
* @param array $arguments
|
||||
* @param string $mockClassName
|
||||
* @param bool $callOriginalConstructor
|
||||
* @param bool $callOriginalClone
|
||||
* @param bool $callAutoload
|
||||
* @param bool $cloneArguments
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
protected function getMockClass($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = false, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false)
|
||||
@@ -1344,16 +1403,19 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* methods of the class mocked. Concrete methods are not mocked by default.
|
||||
* To mock concrete methods, use the 7th parameter ($mockedMethods).
|
||||
*
|
||||
* @param string $originalClassName
|
||||
* @param array $arguments
|
||||
* @param string $mockClassName
|
||||
* @param bool $callOriginalConstructor
|
||||
* @param bool $callOriginalClone
|
||||
* @param bool $callAutoload
|
||||
* @param array $mockedMethods
|
||||
* @param bool $cloneArguments
|
||||
* @param string $originalClassName
|
||||
* @param array $arguments
|
||||
* @param string $mockClassName
|
||||
* @param bool $callOriginalConstructor
|
||||
* @param bool $callOriginalClone
|
||||
* @param bool $callAutoload
|
||||
* @param array $mockedMethods
|
||||
* @param bool $cloneArguments
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_MockObject
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function getMockForAbstractClass($originalClassName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = array(), $cloneArguments = false)
|
||||
@@ -1377,13 +1439,15 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
/**
|
||||
* Returns a mock object based on the given WSDL file.
|
||||
*
|
||||
* @param string $wsdlFile
|
||||
* @param string $originalClassName
|
||||
* @param string $mockClassName
|
||||
* @param array $methods
|
||||
* @param bool $callOriginalConstructor
|
||||
* @param array $options An array of options passed to SOAPClient::_construct
|
||||
* @param string $wsdlFile
|
||||
* @param string $originalClassName
|
||||
* @param string $mockClassName
|
||||
* @param array $methods
|
||||
* @param bool $callOriginalConstructor
|
||||
* @param array $options An array of options passed to SOAPClient::_construct
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_MockObject
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
protected function getMockFromWsdl($wsdlFile, $originalClassName = '', $mockClassName = '', array $methods = array(), $callOriginalConstructor = true, array $options = array())
|
||||
@@ -1419,16 +1483,19 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* of the trait mocked. Concrete methods to mock can be specified with the
|
||||
* `$mockedMethods` parameter.
|
||||
*
|
||||
* @param string $traitName
|
||||
* @param array $arguments
|
||||
* @param string $mockClassName
|
||||
* @param bool $callOriginalConstructor
|
||||
* @param bool $callOriginalClone
|
||||
* @param bool $callAutoload
|
||||
* @param array $mockedMethods
|
||||
* @param bool $cloneArguments
|
||||
* @param string $traitName
|
||||
* @param array $arguments
|
||||
* @param string $mockClassName
|
||||
* @param bool $callOriginalConstructor
|
||||
* @param bool $callOriginalClone
|
||||
* @param bool $callAutoload
|
||||
* @param array $mockedMethods
|
||||
* @param bool $cloneArguments
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_MockObject
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function getMockForTrait($traitName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = array(), $cloneArguments = false)
|
||||
@@ -1452,15 +1519,18 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
/**
|
||||
* Returns an object for the specified trait.
|
||||
*
|
||||
* @param string $traitName
|
||||
* @param array $arguments
|
||||
* @param string $traitClassName
|
||||
* @param bool $callOriginalConstructor
|
||||
* @param bool $callOriginalClone
|
||||
* @param bool $callAutoload
|
||||
* @param bool $cloneArguments
|
||||
* @param string $traitName
|
||||
* @param array $arguments
|
||||
* @param string $traitClassName
|
||||
* @param bool $callOriginalConstructor
|
||||
* @param bool $callOriginalClone
|
||||
* @param bool $callAutoload
|
||||
* @param bool $cloneArguments
|
||||
*
|
||||
* @return object
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
protected function getObjectForTrait($traitName, array $arguments = array(), $traitClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false)
|
||||
@@ -1477,9 +1547,12 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $classOrInterface
|
||||
* @param string|null $classOrInterface
|
||||
*
|
||||
* @return \Prophecy\Prophecy\ObjectProphecy
|
||||
*
|
||||
* @throws \LogicException
|
||||
*
|
||||
* @since Method available since Release 4.5.0
|
||||
*/
|
||||
protected function prophesize($classOrInterface = null)
|
||||
@@ -1491,6 +1564,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Adds a value to the assertion counter.
|
||||
*
|
||||
* @param int $count
|
||||
*
|
||||
* @since Method available since Release 3.3.3
|
||||
*/
|
||||
public function addToAssertionCount($count)
|
||||
@@ -1502,6 +1576,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns the number of assertions performed by this test.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public function getNumAssertions()
|
||||
@@ -1514,6 +1589,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* zero or more times.
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function any()
|
||||
@@ -1525,6 +1601,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns a matcher that matches when the method is never executed.
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function never()
|
||||
@@ -1536,8 +1613,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns a matcher that matches when the method is executed
|
||||
* at least N times.
|
||||
*
|
||||
* @param int $requiredInvocations
|
||||
* @param int $requiredInvocations
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount
|
||||
*
|
||||
* @since Method available since Release 4.2.0
|
||||
*/
|
||||
public static function atLeast($requiredInvocations)
|
||||
@@ -1551,6 +1630,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns a matcher that matches when the method is executed at least once.
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function atLeastOnce()
|
||||
@@ -1562,6 +1642,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns a matcher that matches when the method is executed exactly once.
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function once()
|
||||
@@ -1573,8 +1654,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns a matcher that matches when the method is executed
|
||||
* exactly $count times.
|
||||
*
|
||||
* @param int $count
|
||||
* @param int $count
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function exactly($count)
|
||||
@@ -1586,8 +1669,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns a matcher that matches when the method is executed
|
||||
* at most N times.
|
||||
*
|
||||
* @param int $allowedInvocations
|
||||
* @param int $allowedInvocations
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount
|
||||
*
|
||||
* @since Method available since Release 4.2.0
|
||||
*/
|
||||
public static function atMost($allowedInvocations)
|
||||
@@ -1601,8 +1686,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Returns a matcher that matches when the method is executed
|
||||
* at the given index.
|
||||
*
|
||||
* @param int $index
|
||||
* @param int $index
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function at($index)
|
||||
@@ -1611,8 +1698,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Stub_Return
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function returnValue($value)
|
||||
@@ -1621,8 +1710,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $valueMap
|
||||
* @param array $valueMap
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Stub_ReturnValueMap
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public static function returnValueMap(array $valueMap)
|
||||
@@ -1631,8 +1722,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $argumentIndex
|
||||
* @param int $argumentIndex
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Stub_ReturnArgument
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function returnArgument($argumentIndex)
|
||||
@@ -1643,8 +1736,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $callback
|
||||
* @param mixed $callback
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Stub_ReturnCallback
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function returnCallback($callback)
|
||||
@@ -1658,6 +1753,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* This method is useful when mocking a fluent interface.
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Stub_ReturnSelf
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public static function returnSelf()
|
||||
@@ -1666,8 +1762,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Exception $exception
|
||||
* @param Exception $exception
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Stub_Exception
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public static function throwException(Exception $exception)
|
||||
@@ -1676,8 +1774,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $value, ...
|
||||
* @param mixed $value, ...
|
||||
*
|
||||
* @return PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function onConsecutiveCalls()
|
||||
@@ -1690,8 +1790,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
/**
|
||||
* Gets the data set description of a TestCase.
|
||||
*
|
||||
* @param bool $includeData
|
||||
* @param bool $includeData
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
protected function getDataSetAsString($includeData = true)
|
||||
@@ -1853,7 +1955,9 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* This method is called when a test method did not execute successfully.
|
||||
*
|
||||
* @param Exception $e
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function onNotSuccessfulTest(Exception $e)
|
||||
@@ -1865,6 +1969,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
* Performs custom preparations on the process isolation template.
|
||||
*
|
||||
* @param Text_Template $template
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
protected function prepareTemplate(Text_Template $template)
|
||||
@@ -1953,10 +2058,16 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
$backupGlobals = $this->backupGlobals === null || $this->backupGlobals === true;
|
||||
|
||||
if ($this->disallowChangesToGlobalState) {
|
||||
$this->compareGlobalStateSnapshots(
|
||||
$this->snapshot,
|
||||
$this->createGlobalStateSnapshot($backupGlobals)
|
||||
);
|
||||
try {
|
||||
$this->compareGlobalStateSnapshots(
|
||||
$this->snapshot,
|
||||
$this->createGlobalStateSnapshot($backupGlobals)
|
||||
);
|
||||
}
|
||||
|
||||
catch (PHPUnit_Framework_RiskyTestError $rte) {
|
||||
// Intentionally left empty
|
||||
}
|
||||
}
|
||||
|
||||
$restorer = new Restorer;
|
||||
@@ -1970,10 +2081,15 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
$this->snapshot = null;
|
||||
|
||||
if (isset($rte)) {
|
||||
throw $rte;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $backupGlobals
|
||||
* @param bool $backupGlobals
|
||||
*
|
||||
* @return Snapshot
|
||||
*/
|
||||
private function createGlobalStateSnapshot($backupGlobals)
|
||||
@@ -2017,8 +2133,9 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Snapshot $before
|
||||
* @param Snapshot $after
|
||||
* @param Snapshot $before
|
||||
* @param Snapshot $after
|
||||
*
|
||||
* @throws PHPUnit_Framework_RiskyTestError
|
||||
*/
|
||||
private function compareGlobalStateSnapshots(Snapshot $before, Snapshot $after)
|
||||
@@ -2049,9 +2166,10 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $before
|
||||
* @param array $after
|
||||
* @param string $header
|
||||
* @param array $before
|
||||
* @param array $after
|
||||
* @param string $header
|
||||
*
|
||||
* @throws PHPUnit_Framework_RiskyTestError
|
||||
*/
|
||||
private function compareGlobalStateSnapshotPart(array $before, array $after, $header)
|
||||
@@ -2073,6 +2191,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
||||
|
||||
/**
|
||||
* @return Prophecy\Prophet
|
||||
*
|
||||
* @since Method available since Release 4.5.0
|
||||
*/
|
||||
private function getProphet()
|
||||
|
@@ -67,6 +67,7 @@ class PHPUnit_Framework_TestFailure
|
||||
* Returns a description for the thrown exception.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function getExceptionAsString()
|
||||
@@ -77,8 +78,10 @@ class PHPUnit_Framework_TestFailure
|
||||
/**
|
||||
* Returns a description for an exception.
|
||||
*
|
||||
* @param Exception $e
|
||||
* @param Exception $e
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.2.0
|
||||
*/
|
||||
public static function exceptionToString(Exception $e)
|
||||
@@ -108,6 +111,7 @@ class PHPUnit_Framework_TestFailure
|
||||
* Returns the name of the failing test (including data set, if any).
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 4.3.0
|
||||
*/
|
||||
public function getTestName()
|
||||
|
@@ -48,6 +48,7 @@ interface PHPUnit_Framework_TestListener
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time);
|
||||
@@ -58,6 +59,7 @@ interface PHPUnit_Framework_TestListener
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time);
|
||||
@@ -66,6 +68,7 @@ interface PHPUnit_Framework_TestListener
|
||||
* A test suite started.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function startTestSuite(PHPUnit_Framework_TestSuite $suite);
|
||||
@@ -74,6 +77,7 @@ interface PHPUnit_Framework_TestListener
|
||||
* A test suite ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function endTestSuite(PHPUnit_Framework_TestSuite $suite);
|
||||
|
@@ -285,6 +285,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Informs the result that a testsuite will be started.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
@@ -302,6 +303,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Informs the result that a testsuite was completed.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
@@ -358,6 +360,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Returns true if no risky test occurred.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function allHarmless()
|
||||
@@ -369,6 +372,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Gets the number of risky tests.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function riskyCount()
|
||||
@@ -400,6 +404,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Returns an Enumeration for the risky tests.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function risky()
|
||||
@@ -421,6 +426,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Returns true if no test has been skipped.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function noneSkipped()
|
||||
@@ -432,6 +438,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Gets the number of skipped tests.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function skippedCount()
|
||||
@@ -443,6 +450,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Returns an Enumeration for the skipped tests.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function skipped()
|
||||
@@ -494,6 +502,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Returns the names of the tests that have passed.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function passed()
|
||||
@@ -505,6 +514,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Returns the (top) test suite.
|
||||
*
|
||||
* @return PHPUnit_Framework_TestSuite
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function topTestSuite()
|
||||
@@ -516,6 +526,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Returns whether code coverage information should be collected.
|
||||
*
|
||||
* @return bool If code coverage should be collected
|
||||
*
|
||||
* @since Method available since Release 3.2.0
|
||||
*/
|
||||
public function getCollectCodeCoverageInformation()
|
||||
@@ -754,6 +765,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Returns the PHP_CodeCoverage object.
|
||||
*
|
||||
* @return PHP_CodeCoverage
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public function getCodeCoverage()
|
||||
@@ -765,6 +777,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Sets the PHP_CodeCoverage object.
|
||||
*
|
||||
* @param PHP_CodeCoverage $codeCoverage
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public function setCodeCoverage(PHP_CodeCoverage $codeCoverage)
|
||||
@@ -775,8 +788,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
/**
|
||||
* Enables or disables the error-to-exception conversion.
|
||||
*
|
||||
* @param bool $flag
|
||||
* @param bool $flag
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.2.14
|
||||
*/
|
||||
public function convertErrorsToExceptions($flag)
|
||||
@@ -792,6 +807,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
* Returns the error-to-exception conversion setting.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function getConvertErrorsToExceptions()
|
||||
@@ -802,8 +818,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
/**
|
||||
* Enables or disables the stopping when an error occurs.
|
||||
*
|
||||
* @param bool $flag
|
||||
* @param bool $flag
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public function stopOnError($flag)
|
||||
@@ -818,8 +836,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
/**
|
||||
* Enables or disables the stopping when a failure occurs.
|
||||
*
|
||||
* @param bool $flag
|
||||
* @param bool $flag
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public function stopOnFailure($flag)
|
||||
@@ -832,8 +852,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $flag
|
||||
* @param bool $flag
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function beStrictAboutTestsThatDoNotTestAnything($flag)
|
||||
@@ -847,6 +869,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function isStrictAboutTestsThatDoNotTestAnything()
|
||||
@@ -855,8 +878,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $flag
|
||||
* @param bool $flag
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function beStrictAboutOutputDuringTests($flag)
|
||||
@@ -870,6 +895,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function isStrictAboutOutputDuringTests()
|
||||
@@ -878,8 +904,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $flag
|
||||
* @param bool $flag
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function beStrictAboutTestSize($flag)
|
||||
@@ -893,6 +921,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function isStrictAboutTestSize()
|
||||
@@ -901,8 +930,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $flag
|
||||
* @param bool $flag
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 4.2.0
|
||||
*/
|
||||
public function beStrictAboutTodoAnnotatedTests($flag)
|
||||
@@ -916,6 +947,7 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.2.0
|
||||
*/
|
||||
public function isStrictAboutTodoAnnotatedTests()
|
||||
@@ -926,8 +958,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
/**
|
||||
* Enables or disables the stopping for risky tests.
|
||||
*
|
||||
* @param bool $flag
|
||||
* @param bool $flag
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function stopOnRisky($flag)
|
||||
@@ -942,8 +976,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
/**
|
||||
* Enables or disables the stopping for incomplete tests.
|
||||
*
|
||||
* @param bool $flag
|
||||
* @param bool $flag
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
public function stopOnIncomplete($flag)
|
||||
@@ -958,8 +994,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
/**
|
||||
* Enables or disables the stopping for skipped tests.
|
||||
*
|
||||
* @param bool $flag
|
||||
* @param bool $flag
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public function stopOnSkipped($flag)
|
||||
@@ -994,8 +1032,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
/**
|
||||
* Sets the timeout for small tests.
|
||||
*
|
||||
* @param int $timeout
|
||||
* @param int $timeout
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public function setTimeoutForSmallTests($timeout)
|
||||
@@ -1010,8 +1050,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
/**
|
||||
* Sets the timeout for medium tests.
|
||||
*
|
||||
* @param int $timeout
|
||||
* @param int $timeout
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public function setTimeoutForMediumTests($timeout)
|
||||
@@ -1026,8 +1068,10 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
/**
|
||||
* Sets the timeout for large tests.
|
||||
*
|
||||
* @param int $timeout
|
||||
* @param int $timeout
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public function setTimeoutForLargeTests($timeout)
|
||||
@@ -1042,8 +1086,9 @@ class PHPUnit_Framework_TestResult implements Countable
|
||||
/**
|
||||
* Returns the class hierarchy for a given class.
|
||||
*
|
||||
* @param string $className
|
||||
* @param bool $asReflectionObjects
|
||||
* @param string $className
|
||||
* @param bool $asReflectionObjects
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getHierarchy($className, $asReflectionObjects = false)
|
||||
|
@@ -131,8 +131,9 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
* name of an existing class) or constructs an empty TestSuite
|
||||
* with the given name.
|
||||
*
|
||||
* @param mixed $theClass
|
||||
* @param string $name
|
||||
* @param mixed $theClass
|
||||
* @param string $name
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($theClass = '', $name = '')
|
||||
@@ -254,7 +255,8 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
/**
|
||||
* Adds the tests from the given class to the suite.
|
||||
*
|
||||
* @param mixed $testClass
|
||||
* @param mixed $testClass
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function addTestSuite($testClass)
|
||||
@@ -307,8 +309,10 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
* added, a <code>PHPUnit_Framework_Warning</code> will be created instead,
|
||||
* leaving the current test run untouched.
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $filename
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 2.3.0
|
||||
*/
|
||||
public function addTestFile($filename)
|
||||
@@ -385,8 +389,10 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
/**
|
||||
* Wrapper for addTestFile() that adds multiple test files.
|
||||
*
|
||||
* @param array|Iterator $filenames
|
||||
* @param array|Iterator $filenames
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 2.3.0
|
||||
*/
|
||||
public function addTestFiles($filenames)
|
||||
@@ -407,7 +413,8 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
/**
|
||||
* Counts the number of test cases that will be run by this test.
|
||||
*
|
||||
* @param bool $preferCache Indicates if cache is preferred.
|
||||
* @param bool $preferCache Indicates if cache is preferred.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count($preferCache = false)
|
||||
@@ -426,9 +433,11 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReflectionClass $theClass
|
||||
* @param string $name
|
||||
* @param ReflectionClass $theClass
|
||||
* @param string $name
|
||||
*
|
||||
* @return PHPUnit_Framework_Test
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public static function createTest(ReflectionClass $theClass, $name)
|
||||
@@ -628,6 +637,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
* Returns the test groups of the suite.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.2.0
|
||||
*/
|
||||
public function getGroups()
|
||||
@@ -644,6 +654,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
* Set tests groups of the test case
|
||||
*
|
||||
* @param array $groups
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function setGroupDetails(array $groups)
|
||||
@@ -654,7 +665,8 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
/**
|
||||
* Runs the tests and collects their result in a TestResult.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*/
|
||||
public function run(PHPUnit_Framework_TestResult $result = null)
|
||||
@@ -749,8 +761,10 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $runTestInSeparateProcess
|
||||
* @param bool $runTestInSeparateProcess
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.7.0
|
||||
*/
|
||||
public function setRunTestInSeparateProcess($runTestInSeparateProcess)
|
||||
@@ -766,6 +780,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
* Runs a test.
|
||||
*
|
||||
* @deprecated
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*/
|
||||
@@ -788,6 +803,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
* Returns the test at the given index.
|
||||
*
|
||||
* @param int
|
||||
*
|
||||
* @return PHPUnit_Framework_Test
|
||||
*/
|
||||
public function testAt($index)
|
||||
@@ -813,6 +829,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
* Set tests of the test suite
|
||||
*
|
||||
* @param array $tests
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function setTests(array $tests)
|
||||
@@ -823,8 +840,10 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
/**
|
||||
* Mark the test suite as skipped.
|
||||
*
|
||||
* @param string $message
|
||||
* @param string $message
|
||||
*
|
||||
* @throws PHPUnit_Framework_SkippedTestSuiteError
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function markTestSuiteSkipped($message = '')
|
||||
@@ -874,7 +893,8 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReflectionMethod $method
|
||||
* @param ReflectionMethod $method
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isTestMethod(ReflectionMethod $method)
|
||||
@@ -892,7 +912,8 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
* @param string $message
|
||||
*
|
||||
* @return PHPUnit_Framework_Warning
|
||||
*/
|
||||
protected static function warning($message)
|
||||
@@ -901,10 +922,12 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
* @param string $methodName
|
||||
* @param string $message
|
||||
* @param string $class
|
||||
* @param string $methodName
|
||||
* @param string $message
|
||||
*
|
||||
* @return PHPUnit_Framework_SkippedTestCase
|
||||
*
|
||||
* @since Method available since Release 4.3.0
|
||||
*/
|
||||
protected static function skipTest($class, $methodName, $message)
|
||||
@@ -913,10 +936,12 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
* @param string $methodName
|
||||
* @param string $message
|
||||
* @param string $class
|
||||
* @param string $methodName
|
||||
* @param string $message
|
||||
*
|
||||
* @return PHPUnit_Framework_IncompleteTestCase
|
||||
*
|
||||
* @since Method available since Release 4.3.0
|
||||
*/
|
||||
protected static function incompleteTest($class, $methodName, $message)
|
||||
@@ -926,6 +951,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
|
||||
/**
|
||||
* @param bool $disallowChangesToGlobalState
|
||||
*
|
||||
* @since Method available since Release 4.6.0
|
||||
*/
|
||||
public function setDisallowChangesToGlobalState($disallowChangesToGlobalState)
|
||||
@@ -937,6 +963,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
|
||||
/**
|
||||
* @param bool $backupGlobals
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public function setBackupGlobals($backupGlobals)
|
||||
@@ -948,6 +975,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
|
||||
/**
|
||||
* @param bool $backupStaticAttributes
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function setBackupStaticAttributes($backupStaticAttributes)
|
||||
@@ -962,6 +990,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra
|
||||
* Returns an iterator for this test suite.
|
||||
*
|
||||
* @return RecursiveIteratorIterator
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
public function getIterator()
|
||||
|
@@ -59,6 +59,7 @@ class PHPUnit_Framework_Warning extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function getMessage()
|
||||
@@ -70,6 +71,7 @@ class PHPUnit_Framework_Warning extends PHPUnit_Framework_TestCase
|
||||
* Returns a string representation of the test case.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function toString()
|
||||
|
@@ -38,9 +38,10 @@ abstract class PHPUnit_Runner_BaseTestRunner
|
||||
* This is a template method, subclasses override
|
||||
* the runFailed() and clearStatus() methods.
|
||||
*
|
||||
* @param string $suiteClassName
|
||||
* @param string $suiteClassFile
|
||||
* @param mixed $suffixes
|
||||
* @param string $suiteClassName
|
||||
* @param string $suiteClassFile
|
||||
* @param mixed $suffixes
|
||||
*
|
||||
* @return PHPUnit_Framework_Test
|
||||
*/
|
||||
public function getTest($suiteClassName, $suiteClassFile = '', $suffixes = '')
|
||||
@@ -110,8 +111,9 @@ abstract class PHPUnit_Runner_BaseTestRunner
|
||||
/**
|
||||
* Returns the loaded ReflectionClass for a suite name.
|
||||
*
|
||||
* @param string $suiteClassName
|
||||
* @param string $suiteClassFile
|
||||
* @param string $suiteClassName
|
||||
* @param string $suiteClassFile
|
||||
*
|
||||
* @return ReflectionClass
|
||||
*/
|
||||
protected function loadSuiteClass($suiteClassName, $suiteClassFile = '')
|
||||
|
@@ -16,9 +16,11 @@
|
||||
class PHPUnit_Runner_StandardTestSuiteLoader implements PHPUnit_Runner_TestSuiteLoader
|
||||
{
|
||||
/**
|
||||
* @param string $suiteClassName
|
||||
* @param string $suiteClassFile
|
||||
* @param string $suiteClassName
|
||||
* @param string $suiteClassFile
|
||||
*
|
||||
* @return ReflectionClass
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function load($suiteClassName, $suiteClassFile = '')
|
||||
@@ -105,7 +107,8 @@ class PHPUnit_Runner_StandardTestSuiteLoader implements PHPUnit_Runner_TestSuite
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReflectionClass $aClass
|
||||
* @param ReflectionClass $aClass
|
||||
*
|
||||
* @return ReflectionClass
|
||||
*/
|
||||
public function reload(ReflectionClass $aClass)
|
||||
|
@@ -16,14 +16,16 @@
|
||||
interface PHPUnit_Runner_TestSuiteLoader
|
||||
{
|
||||
/**
|
||||
* @param string $suiteClassName
|
||||
* @param string $suiteClassFile
|
||||
* @param string $suiteClassName
|
||||
* @param string $suiteClassFile
|
||||
*
|
||||
* @return ReflectionClass
|
||||
*/
|
||||
public function load($suiteClassName, $suiteClassFile = '');
|
||||
|
||||
/**
|
||||
* @param ReflectionClass $aClass
|
||||
* @param ReflectionClass $aClass
|
||||
*
|
||||
* @return ReflectionClass
|
||||
*/
|
||||
public function reload(ReflectionClass $aClass);
|
||||
|
@@ -30,13 +30,23 @@ class PHPUnit_Runner_Version
|
||||
}
|
||||
|
||||
if (self::$version === null) {
|
||||
$version = new SebastianBergmann\Version('4.8.9', dirname(dirname(__DIR__)));
|
||||
$version = new SebastianBergmann\Version('4.8.16', dirname(dirname(__DIR__)));
|
||||
self::$version = $version->getVersion();
|
||||
}
|
||||
|
||||
return self::$version;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 4.8.13
|
||||
*/
|
||||
public static function series()
|
||||
{
|
||||
return implode('.', array_slice(explode('.', self::id()), 0, 2));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -47,6 +57,7 @@ class PHPUnit_Runner_Version
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public static function getReleaseChannel()
|
||||
|
@@ -101,8 +101,9 @@ class PHPUnit_TextUI_Command
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $argv
|
||||
* @param bool $exit
|
||||
* @param array $argv
|
||||
* @param bool $exit
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function run(array $argv, $exit = true)
|
||||
@@ -169,6 +170,7 @@ class PHPUnit_TextUI_Command
|
||||
* Create a TestRunner, override in subclasses.
|
||||
*
|
||||
* @return PHPUnit_TextUI_TestRunner
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
protected function createRunner()
|
||||
@@ -227,6 +229,8 @@ class PHPUnit_TextUI_Command
|
||||
$this->longOptions['check-version'] = null;
|
||||
$this->longOptions['selfupdate'] = null;
|
||||
$this->longOptions['self-update'] = null;
|
||||
$this->longOptions['selfupgrade'] = null;
|
||||
$this->longOptions['self-upgrade'] = null;
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -484,6 +488,15 @@ class PHPUnit_TextUI_Command
|
||||
$this->handleSelfUpdate();
|
||||
break;
|
||||
|
||||
case '--selfupgrade':
|
||||
case '--self-upgrade':
|
||||
$this->handleSelfUpdate(true);
|
||||
break;
|
||||
|
||||
case '--whitelist':
|
||||
$this->arguments['whitelist'] = $option[1];
|
||||
break;
|
||||
|
||||
default:
|
||||
$optionName = str_replace('--', '', $option[0]);
|
||||
|
||||
@@ -665,8 +678,9 @@ class PHPUnit_TextUI_Command
|
||||
/**
|
||||
* Handles the loading of the PHPUnit_Runner_TestSuiteLoader implementation.
|
||||
*
|
||||
* @param string $loaderClass
|
||||
* @param string $loaderFile
|
||||
* @param string $loaderClass
|
||||
* @param string $loaderFile
|
||||
*
|
||||
* @return PHPUnit_Runner_TestSuiteLoader
|
||||
*/
|
||||
protected function handleLoader($loaderClass, $loaderFile = '')
|
||||
@@ -709,8 +723,9 @@ class PHPUnit_TextUI_Command
|
||||
/**
|
||||
* Handles the loading of the PHPUnit_Util_Printer implementation.
|
||||
*
|
||||
* @param string $printerClass
|
||||
* @param string $printerFile
|
||||
* @param string $printerClass
|
||||
* @param string $printerFile
|
||||
*
|
||||
* @return PHPUnit_Util_Printer
|
||||
*/
|
||||
protected function handlePrinter($printerClass, $printerFile = '')
|
||||
@@ -770,7 +785,7 @@ class PHPUnit_TextUI_Command
|
||||
/**
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
protected function handleSelfUpdate()
|
||||
protected function handleSelfUpdate($upgrade = false)
|
||||
{
|
||||
$this->printVersionString();
|
||||
|
||||
@@ -786,16 +801,28 @@ class PHPUnit_TextUI_Command
|
||||
exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
|
||||
}
|
||||
|
||||
$remoteFilename = sprintf(
|
||||
'https://phar.phpunit.de/phpunit%s.phar',
|
||||
PHPUnit_Runner_Version::getReleaseChannel()
|
||||
);
|
||||
if (!$upgrade) {
|
||||
$remoteFilename = sprintf(
|
||||
'https://phar.phpunit.de/phpunit-%s.phar',
|
||||
file_get_contents(
|
||||
sprintf(
|
||||
'https://phar.phpunit.de/latest-version-of/phpunit-%s',
|
||||
PHPUnit_Runner_Version::series()
|
||||
)
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$remoteFilename = sprintf(
|
||||
'https://phar.phpunit.de/phpunit%s.phar',
|
||||
PHPUnit_Runner_Version::getReleaseChannel()
|
||||
);
|
||||
}
|
||||
|
||||
$tempFilename = tempnam(sys_get_temp_dir(), 'phpunit') . '.phar';
|
||||
|
||||
// Workaround for https://bugs.php.net/bug.php?id=65538
|
||||
$caFile = dirname($tempFilename) . '/ca.pem';
|
||||
copy(__PHPUNIT_PHAR_ROOT__ . '/phar/ca.pem', $caFile);
|
||||
copy(__PHPUNIT_PHAR_ROOT__ . '/ca.pem', $caFile);
|
||||
|
||||
print 'Updating the PHPUnit PHAR ... ';
|
||||
|
||||
@@ -857,7 +884,7 @@ class PHPUnit_TextUI_Command
|
||||
|
||||
if ($isOutdated) {
|
||||
print "You are not using the latest version of PHPUnit.\n";
|
||||
print 'Use "phpunit --self-update" to install PHPUnit ' . $latestVersion . "\n";
|
||||
print 'Use "phpunit --self-upgrade" to install PHPUnit ' . $latestVersion . "\n";
|
||||
} else {
|
||||
print "You are using the latest version of PHPUnit.\n";
|
||||
}
|
||||
@@ -953,7 +980,8 @@ EOT;
|
||||
|
||||
if (defined('__PHPUNIT_PHAR__')) {
|
||||
print "\n --check-version Check whether PHPUnit is the latest version.";
|
||||
print "\n --self-update Update PHPUnit to the latest version.\n";
|
||||
print "\n --self-update Update PHPUnit to the latest version within the same\n release series.\n";
|
||||
print "\n --self-upgrade Upgrade PHPUnit to the latest version.\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -108,12 +108,14 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param mixed $out
|
||||
* @param bool $verbose
|
||||
* @param string $colors
|
||||
* @param bool $debug
|
||||
* @param int|string $numberOfColumns
|
||||
* @param mixed $out
|
||||
* @param bool $verbose
|
||||
* @param string $colors
|
||||
* @param bool $debug
|
||||
* @param int|string $numberOfColumns
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function __construct($out = null, $verbose = false, $colors = self::COLOR_DEFAULT, $debug = false, $numberOfColumns = 80)
|
||||
@@ -298,6 +300,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
protected function printRisky(PHPUnit_Framework_TestResult $result)
|
||||
@@ -307,6 +310,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
protected function printSkipped(PHPUnit_Framework_TestResult $result)
|
||||
@@ -425,6 +429,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
@@ -439,6 +444,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
@@ -451,6 +457,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn
|
||||
* A testsuite started.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
@@ -466,6 +473,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn
|
||||
* A testsuite ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
@@ -550,9 +558,11 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn
|
||||
* Formats a buffer with a specified ANSI color sequence if colors are
|
||||
* enabled.
|
||||
*
|
||||
* @param string $color
|
||||
* @param string $buffer
|
||||
* @param string $color
|
||||
* @param string $buffer
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
protected function formatWithColor($color, $buffer)
|
||||
@@ -587,6 +597,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn
|
||||
* @param string $color
|
||||
* @param string $buffer
|
||||
* @param bool $lf
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
protected function writeWithColor($color, $buffer, $lf = true)
|
||||
@@ -603,6 +614,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn
|
||||
*
|
||||
* @param string $color
|
||||
* @param string $buffer
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
protected function writeProgressWithColor($color, $buffer)
|
||||
@@ -616,6 +628,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn
|
||||
* @param string $name
|
||||
* @param string $color
|
||||
* @param bool $always
|
||||
*
|
||||
* @since Method available since Release 4.6.5
|
||||
*/
|
||||
private function writeCountString($count, $name, $color, $always = false)
|
||||
|
@@ -55,6 +55,7 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner
|
||||
/**
|
||||
* @param PHPUnit_Runner_TestSuiteLoader $loader
|
||||
* @param PHP_CodeCoverage_Filter $filter
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function __construct(PHPUnit_Runner_TestSuiteLoader $loader = null, PHP_CodeCoverage_Filter $filter = null)
|
||||
@@ -69,9 +70,11 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_Test|ReflectionClass $test
|
||||
* @param array $arguments
|
||||
* @param PHPUnit_Framework_Test|ReflectionClass $test
|
||||
* @param array $arguments
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public static function run($test, array $arguments = array())
|
||||
@@ -136,12 +139,17 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_Test $suite
|
||||
* @param array $arguments
|
||||
* @param PHPUnit_Framework_Test $suite
|
||||
* @param array $arguments
|
||||
*
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
*/
|
||||
public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
|
||||
{
|
||||
if (isset($arguments['configuration'])) {
|
||||
$GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] = $arguments['configuration'];
|
||||
}
|
||||
|
||||
$this->handleConfiguration($arguments);
|
||||
|
||||
$this->processSuiteFilters($suite, $arguments);
|
||||
@@ -498,7 +506,7 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner
|
||||
if (isset($arguments['coverageText'])) {
|
||||
if ($arguments['coverageText'] == 'php://stdout') {
|
||||
$outputStream = $this->printer;
|
||||
$colors = $arguments['colors'];
|
||||
$colors = $arguments['colors'] && $arguments['colors'] != PHPUnit_TextUI_ResultPrinter::COLOR_NEVER;
|
||||
} else {
|
||||
$outputStream = new PHPUnit_Util_Printer($arguments['coverageText']);
|
||||
$colors = false;
|
||||
@@ -554,6 +562,7 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner
|
||||
|
||||
/**
|
||||
* @param string $buffer
|
||||
*
|
||||
* @since Method available since Release 3.1.0
|
||||
*/
|
||||
protected function write($buffer)
|
||||
@@ -573,6 +582,7 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner
|
||||
* Returns the loader to be used.
|
||||
*
|
||||
* @return PHPUnit_Runner_TestSuiteLoader
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function getLoader()
|
||||
@@ -586,6 +596,7 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
*
|
||||
* @since Method available since Release 3.2.1
|
||||
*/
|
||||
protected function handleConfiguration(array &$arguments)
|
||||
@@ -980,6 +991,7 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner
|
||||
/**
|
||||
* @param $extension
|
||||
* @param string $message
|
||||
*
|
||||
* @since Method available since Release 4.7.3
|
||||
*/
|
||||
private function showExtensionNotLoadedWarning($extension, $message = '')
|
||||
|
@@ -50,6 +50,7 @@ class PHPUnit_Util_Blacklist
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 4.1.0
|
||||
*/
|
||||
public function getBlacklistedDirectories()
|
||||
@@ -60,7 +61,8 @@ class PHPUnit_Util_Blacklist
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $file
|
||||
* @param string $file
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isBlacklisted($file)
|
||||
|
@@ -169,8 +169,10 @@ class PHPUnit_Util_Configuration
|
||||
/**
|
||||
* Returns a PHPUnit configuration object.
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $filename
|
||||
*
|
||||
* @return PHPUnit_Util_Configuration
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function getInstance($filename)
|
||||
@@ -197,6 +199,7 @@ class PHPUnit_Util_Configuration
|
||||
* Returns the realpath to the configuration file.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public function getFilename()
|
||||
@@ -208,6 +211,7 @@ class PHPUnit_Util_Configuration
|
||||
* Returns the configuration for SUT filtering.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.2.1
|
||||
*/
|
||||
public function getFilterConfiguration()
|
||||
@@ -283,6 +287,7 @@ class PHPUnit_Util_Configuration
|
||||
* Returns the configuration for groups.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.2.1
|
||||
*/
|
||||
public function getGroupConfiguration()
|
||||
@@ -307,6 +312,7 @@ class PHPUnit_Util_Configuration
|
||||
* Returns the configuration for listeners.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public function getListenerConfiguration()
|
||||
@@ -422,6 +428,7 @@ class PHPUnit_Util_Configuration
|
||||
* Returns the PHP configuration.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.2.1
|
||||
*/
|
||||
public function getPHPConfiguration()
|
||||
@@ -540,6 +547,7 @@ class PHPUnit_Util_Configuration
|
||||
* Returns the PHPUnit configuration.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.2.14
|
||||
*/
|
||||
public function getPHPUnitConfiguration()
|
||||
@@ -796,6 +804,7 @@ class PHPUnit_Util_Configuration
|
||||
* Returns the SeleniumTestCase browser configuration.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.2.9
|
||||
*/
|
||||
public function getSeleniumBrowserConfiguration()
|
||||
@@ -846,6 +855,7 @@ class PHPUnit_Util_Configuration
|
||||
* Returns the test suite configuration.
|
||||
*
|
||||
* @return PHPUnit_Framework_TestSuite
|
||||
*
|
||||
* @since Method available since Release 3.2.1
|
||||
*/
|
||||
public function getTestSuiteConfiguration($testSuiteFilter = null)
|
||||
@@ -874,8 +884,10 @@ class PHPUnit_Util_Configuration
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DOMElement $testSuiteNode
|
||||
* @param DOMElement $testSuiteNode
|
||||
*
|
||||
* @return PHPUnit_Framework_TestSuite
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
protected function getTestSuite(DOMElement $testSuiteNode, $testSuiteFilter = null)
|
||||
@@ -992,9 +1004,11 @@ class PHPUnit_Util_Configuration
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
* @param bool $default
|
||||
* @param string $value
|
||||
* @param bool $default
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.2.3
|
||||
*/
|
||||
protected function getBoolean($value, $default)
|
||||
@@ -1009,9 +1023,11 @@ class PHPUnit_Util_Configuration
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
* @param bool $default
|
||||
* @param string $value
|
||||
* @param bool $default
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
protected function getInteger($value, $default)
|
||||
@@ -1024,8 +1040,10 @@ class PHPUnit_Util_Configuration
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $query
|
||||
* @param string $query
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.2.3
|
||||
*/
|
||||
protected function readFilterDirectories($query)
|
||||
@@ -1069,8 +1087,10 @@ class PHPUnit_Util_Configuration
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $query
|
||||
* @param string $query
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.2.3
|
||||
*/
|
||||
protected function readFilterFiles($query)
|
||||
@@ -1088,9 +1108,11 @@ class PHPUnit_Util_Configuration
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param bool $useIncludePath
|
||||
* @param string $path
|
||||
* @param bool $useIncludePath
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
protected function toAbsolutePath($path, $useIncludePath = false)
|
||||
|
@@ -36,10 +36,11 @@ class PHPUnit_Util_ErrorHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $errno
|
||||
* @param string $errstr
|
||||
* @param string $errfile
|
||||
* @param int $errline
|
||||
* @param int $errno
|
||||
* @param string $errstr
|
||||
* @param string $errfile
|
||||
* @param int $errline
|
||||
*
|
||||
* @throws PHPUnit_Framework_Error
|
||||
*/
|
||||
public static function handleError($errno, $errstr, $errfile, $errline)
|
||||
@@ -87,7 +88,9 @@ class PHPUnit_Util_ErrorHandler
|
||||
/**
|
||||
* Registers an error handler and returns a function that will restore
|
||||
* the previous handler when invoked
|
||||
* @param int $severity PHP predefined error constant
|
||||
*
|
||||
* @param int $severity PHP predefined error constant
|
||||
*
|
||||
* @throws Exception if event of specified severity is emitted
|
||||
*/
|
||||
public static function handleErrorOnce($severity = E_WARNING)
|
||||
|
@@ -19,8 +19,10 @@ class PHPUnit_Util_Fileloader
|
||||
* Checks if a PHP sourcefile is readable.
|
||||
* The sourcefile is loaded through the load() method.
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $filename
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public static function checkAndLoad($filename)
|
||||
@@ -41,8 +43,10 @@ class PHPUnit_Util_Fileloader
|
||||
/**
|
||||
* Loads a PHP sourcefile.
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $filename
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public static function load($filename)
|
||||
|
@@ -25,8 +25,10 @@ class PHPUnit_Util_Filesystem
|
||||
* - PEAR CS: Foo_Bar_Baz -> Foo/Bar/Baz.php
|
||||
* - Namespace: Foo\Bar\Baz -> Foo/Bar/Baz.php
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $className
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function classNameToFilename($className)
|
||||
|
13
code/vendor/phpunit/phpunit/src/Util/Filter.php
vendored
13
code/vendor/phpunit/phpunit/src/Util/Filter.php
vendored
@@ -18,8 +18,9 @@ class PHPUnit_Util_Filter
|
||||
/**
|
||||
* Filters stack frames from PHPUnit classes.
|
||||
*
|
||||
* @param Exception $e
|
||||
* @param bool $asString
|
||||
* @param Exception $e
|
||||
* @param bool $asString
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getFilteredStacktrace(Exception $e, $asString = true)
|
||||
@@ -84,10 +85,12 @@ class PHPUnit_Util_Filter
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $trace
|
||||
* @param string $file
|
||||
* @param int $line
|
||||
* @param array $trace
|
||||
* @param string $file
|
||||
* @param int $line
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.3.2
|
||||
*/
|
||||
private static function frameExists(array $trace, $file, $line)
|
||||
|
@@ -17,9 +17,10 @@
|
||||
class PHPUnit_Util_InvalidArgumentHelper
|
||||
{
|
||||
/**
|
||||
* @param int $argument
|
||||
* @param string $type
|
||||
* @param mixed $value
|
||||
* @param int $argument
|
||||
* @param string $type
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return PHPUnit_Framework_Exception
|
||||
*/
|
||||
public static function factory($argument, $type, $value = null)
|
||||
|
@@ -96,6 +96,7 @@ class PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer implements PHPUnit_Fram
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
|
@@ -43,27 +43,27 @@ class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Fra
|
||||
protected $testSuites = array();
|
||||
|
||||
/**
|
||||
* @var integer[]
|
||||
* @var int[]
|
||||
*/
|
||||
protected $testSuiteTests = array(0);
|
||||
|
||||
/**
|
||||
* @var integer[]
|
||||
* @var int[]
|
||||
*/
|
||||
protected $testSuiteAssertions = array(0);
|
||||
|
||||
/**
|
||||
* @var integer[]
|
||||
* @var int[]
|
||||
*/
|
||||
protected $testSuiteErrors = array(0);
|
||||
|
||||
/**
|
||||
* @var integer[]
|
||||
* @var int[]
|
||||
*/
|
||||
protected $testSuiteFailures = array(0);
|
||||
|
||||
/**
|
||||
* @var integer[]
|
||||
* @var int[]
|
||||
*/
|
||||
protected $testSuiteTimes = array(0);
|
||||
|
||||
@@ -217,6 +217,7 @@ class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Fra
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
@@ -246,6 +247,7 @@ class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Fra
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
@@ -273,6 +275,7 @@ class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Fra
|
||||
* A testsuite started.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
@@ -308,6 +311,7 @@ class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Fra
|
||||
* A testsuite ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
@@ -422,6 +426,7 @@ class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Fra
|
||||
* Returns the XML as a string.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function getXML()
|
||||
@@ -437,6 +442,7 @@ class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Fra
|
||||
* PHPUnit with Phing.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function setWriteDocument($flag)
|
||||
|
@@ -34,8 +34,10 @@ class PHPUnit_Util_Log_TAP extends PHPUnit_Util_Printer implements PHPUnit_Frame
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param mixed $out
|
||||
* @param mixed $out
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.3.4
|
||||
*/
|
||||
public function __construct($out = null)
|
||||
@@ -116,6 +118,7 @@ class PHPUnit_Util_Log_TAP extends PHPUnit_Util_Printer implements PHPUnit_Frame
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
@@ -137,6 +140,7 @@ class PHPUnit_Util_Log_TAP extends PHPUnit_Util_Printer implements PHPUnit_Frame
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
|
23
code/vendor/phpunit/phpunit/src/Util/PHP.php
vendored
23
code/vendor/phpunit/phpunit/src/Util/PHP.php
vendored
@@ -17,6 +17,7 @@ abstract class PHPUnit_Util_PHP
|
||||
{
|
||||
/**
|
||||
* @return PHPUnit_Util_PHP
|
||||
*
|
||||
* @since Method available since Release 3.5.12
|
||||
*/
|
||||
public static function factory()
|
||||
@@ -31,9 +32,10 @@ abstract class PHPUnit_Util_PHP
|
||||
/**
|
||||
* Runs a single test in a separate PHP process.
|
||||
*
|
||||
* @param string $job
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param string $job
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function runTestJob($job, PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result)
|
||||
@@ -53,16 +55,20 @@ abstract class PHPUnit_Util_PHP
|
||||
/**
|
||||
* Runs a single job (PHP code) using a separate PHP process.
|
||||
*
|
||||
* @param string $job
|
||||
* @param array $settings
|
||||
* @param string $job
|
||||
* @param array $settings
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
abstract public function runJob($job, array $settings = array());
|
||||
|
||||
/**
|
||||
* @param array $settings
|
||||
* @param array $settings
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
protected function settingsToParameters(array $settings)
|
||||
@@ -83,6 +89,7 @@ abstract class PHPUnit_Util_PHP
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param string $stdout
|
||||
* @param string $stderr
|
||||
*
|
||||
* @since Method available since Release 3.5.0
|
||||
*/
|
||||
private function processChildResult(PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result, $stdout, $stderr)
|
||||
@@ -184,8 +191,10 @@ abstract class PHPUnit_Util_PHP
|
||||
/**
|
||||
* Gets the thrown exception from a PHPUnit_Framework_TestFailure.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestFailure $error
|
||||
* @param PHPUnit_Framework_TestFailure $error
|
||||
*
|
||||
* @return Exception
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
* @see https://github.com/sebastianbergmann/phpunit/issues/74
|
||||
*/
|
||||
|
@@ -20,9 +20,11 @@ class PHPUnit_Util_PHP_Default extends PHPUnit_Util_PHP
|
||||
/**
|
||||
* Runs a single job (PHP code) using a separate PHP process.
|
||||
*
|
||||
* @param string $job
|
||||
* @param array $settings
|
||||
* @param string $job
|
||||
* @param array $settings
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function runJob($job, array $settings = array())
|
||||
@@ -61,9 +63,11 @@ class PHPUnit_Util_PHP_Default extends PHPUnit_Util_PHP
|
||||
}
|
||||
|
||||
/**
|
||||
* @param resource $pipe
|
||||
* @param string $job
|
||||
* @param resource $pipe
|
||||
* @param string $job
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.5.12
|
||||
*/
|
||||
protected function process($pipe, $job)
|
||||
|
@@ -70,6 +70,13 @@ function __phpunit_run_isolated_test()
|
||||
);
|
||||
}
|
||||
|
||||
$configurationFilePath = '{configurationFilePath}';
|
||||
|
||||
if ('' !== $configurationFilePath) {
|
||||
$configuration = PHPUnit_Util_Configuration::getInstance($configurationFilePath);
|
||||
$configuration->handlePHPConfiguration();
|
||||
}
|
||||
|
||||
{constants}
|
||||
{included_files}
|
||||
{globals}
|
||||
|
@@ -74,9 +74,11 @@ class PHPUnit_Util_PHP_Windows extends PHPUnit_Util_PHP_Default
|
||||
}
|
||||
|
||||
/**
|
||||
* @param resource $pipe
|
||||
* @param string $job
|
||||
* @param resource $pipe
|
||||
* @param string $job
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.5.12
|
||||
*/
|
||||
protected function process($pipe, $job)
|
||||
|
@@ -40,7 +40,8 @@ class PHPUnit_Util_Printer
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param mixed $out
|
||||
* @param mixed $out
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
public function __construct($out = null)
|
||||
@@ -142,6 +143,7 @@ class PHPUnit_Util_Printer
|
||||
* Check auto-flush mode.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public function getAutoFlush()
|
||||
@@ -156,6 +158,7 @@ class PHPUnit_Util_Printer
|
||||
* not be confused with the different effects of this class' flush() method.
|
||||
*
|
||||
* @param bool $autoFlush
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public function setAutoFlush($autoFlush)
|
||||
|
@@ -18,7 +18,8 @@ class PHPUnit_Util_String
|
||||
/**
|
||||
* Converts a string to UTF-8 encoding.
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function convertToUtf8($string)
|
||||
@@ -37,7 +38,8 @@ class PHPUnit_Util_String
|
||||
/**
|
||||
* Checks a string for UTF-8 encoding.
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $string
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected static function isUtf8($string)
|
||||
|
181
code/vendor/phpunit/phpunit/src/Util/Test.php
vendored
181
code/vendor/phpunit/phpunit/src/Util/Test.php
vendored
@@ -39,8 +39,9 @@ class PHPUnit_Util_Test
|
||||
private static $hookMethods = array();
|
||||
|
||||
/**
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param bool $asString
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param bool $asString
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function describe(PHPUnit_Framework_Test $test, $asString = true)
|
||||
@@ -65,10 +66,13 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array|bool
|
||||
*
|
||||
* @throws PHPUnit_Framework_CodeCoverageException
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public static function getLinesToBeCovered($className, $methodName)
|
||||
@@ -88,9 +92,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns lines of code specified with the @uses annotation.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public static function getLinesToBeUsed($className, $methodName)
|
||||
@@ -99,11 +105,14 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $mode
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $mode
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws PHPUnit_Framework_CodeCoverageException
|
||||
*
|
||||
* @since Method available since Release 4.2.0
|
||||
*/
|
||||
private static function getLinesToBeCoveredOrUsed($className, $methodName, $mode)
|
||||
@@ -147,6 +156,8 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
$element = preg_replace('/[\s()]+$/', '', $element);
|
||||
$element = explode(' ', $element);
|
||||
$element = $element[0];
|
||||
|
||||
$codeList = array_merge(
|
||||
$codeList,
|
||||
@@ -160,9 +171,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the requirements for a test.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public static function getRequirements($className, $methodName)
|
||||
@@ -204,9 +217,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the missing requirements for a test.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 4.3.0
|
||||
*/
|
||||
public static function getMissingRequirements($className, $methodName)
|
||||
@@ -256,9 +271,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the expected exception for a test.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.3.6
|
||||
*/
|
||||
public static function getExpectedException($className, $methodName)
|
||||
@@ -321,7 +338,8 @@ class PHPUnit_Util_Test
|
||||
*
|
||||
* If the constant is not found the string is used as is to ensure maximum BC.
|
||||
*
|
||||
* @param string $message
|
||||
* @param string $message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private static function parseAnnotationContent($message)
|
||||
@@ -338,11 +356,14 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the provided data for a method.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @return array|Iterator when a data provider is specified and exists
|
||||
* null when no data provider is specified
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array|Iterator when a data provider is specified and exists
|
||||
* null when no data provider is specified
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.2.0
|
||||
*/
|
||||
public static function getProvidedData($className, $methodName)
|
||||
@@ -382,11 +403,13 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the provided data for a method.
|
||||
*
|
||||
* @param string $docComment
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @return array|Iterator when a data provider is specified and exists
|
||||
* null when no data provider is specified
|
||||
* @param string $docComment
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array|Iterator when a data provider is specified and exists
|
||||
* null when no data provider is specified
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*/
|
||||
private static function getDataFromDataProviderAnnotation($docComment, $className, $methodName)
|
||||
@@ -430,9 +453,11 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $docComment full docComment string
|
||||
* @return array when @testWith annotation is defined
|
||||
* null when @testWith annotation is omitted
|
||||
* @param string $docComment full docComment string
|
||||
*
|
||||
* @return array when @testWith annotation is defined
|
||||
* null when @testWith annotation is omitted
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception when @testWith annotation is defined but cannot be parsed
|
||||
*/
|
||||
public static function getDataFromTestWithAnnotation($docComment)
|
||||
@@ -470,10 +495,13 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws ReflectionException
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function parseTestMethodAnnotations($className, $methodName = '')
|
||||
@@ -500,8 +528,10 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $docblock
|
||||
* @param string $docblock
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
private static function parseAnnotations($docblock)
|
||||
@@ -524,9 +554,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the backup settings for a test.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function getBackupSettings($className, $methodName)
|
||||
@@ -548,9 +580,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the dependencies for a test class or method.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function getDependencies($className, $methodName)
|
||||
@@ -579,9 +613,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the error handler settings for a test.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function getErrorHandlerSettings($className, $methodName)
|
||||
@@ -596,9 +632,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the groups for a test class or method.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.2.0
|
||||
*/
|
||||
public static function getGroups($className, $methodName = '')
|
||||
@@ -652,9 +690,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the size of the test.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since Method available since Release 3.6.0
|
||||
*/
|
||||
public static function getSize($className, $methodName)
|
||||
@@ -681,9 +721,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the tickets for a test class or method.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function getTickets($className, $methodName)
|
||||
@@ -709,9 +751,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the process isolation settings for a test.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.4.1
|
||||
*/
|
||||
public static function getProcessIsolationSettings($className, $methodName)
|
||||
@@ -732,9 +776,11 @@ class PHPUnit_Util_Test
|
||||
/**
|
||||
* Returns the preserve global state settings for a test.
|
||||
*
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function getPreserveGlobalStateSettings($className, $methodName)
|
||||
@@ -747,8 +793,10 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $className
|
||||
* @param string $className
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 4.0.8
|
||||
*/
|
||||
public static function getHookMethods($className)
|
||||
@@ -789,6 +837,7 @@ class PHPUnit_Util_Test
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 4.0.9
|
||||
*/
|
||||
private static function emptyHookMethodsArray()
|
||||
@@ -802,10 +851,12 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $settingName
|
||||
* @param string $className
|
||||
* @param string $methodName
|
||||
* @param string $settingName
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
private static function getBooleanAnnotationSetting($className, $methodName, $settingName)
|
||||
@@ -837,16 +888,21 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $element
|
||||
* @param string $element
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws PHPUnit_Framework_InvalidCoversTargetException
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
private static function resolveElementToReflectionObjects($element)
|
||||
{
|
||||
$codeToCoverList = array();
|
||||
|
||||
if (strpos($element, '::') !== false) {
|
||||
if (strpos($element, '\\') !== false && function_exists($element)) {
|
||||
$codeToCoverList[] = new ReflectionFunction($element);
|
||||
} elseif (strpos($element, '::') !== false) {
|
||||
list($className, $methodName) = explode('::', $element);
|
||||
|
||||
if (isset($methodName[0]) && $methodName[0] == '<') {
|
||||
@@ -952,7 +1008,8 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $reflectors
|
||||
* @param array $reflectors
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private static function resolveReflectionObjectsToLines(array $reflectors)
|
||||
@@ -978,8 +1035,10 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReflectionMethod $method
|
||||
* @param ReflectionMethod $method
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.0.8
|
||||
*/
|
||||
private static function isBeforeClassMethod(ReflectionMethod $method)
|
||||
@@ -988,8 +1047,10 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReflectionMethod $method
|
||||
* @param ReflectionMethod $method
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.0.8
|
||||
*/
|
||||
private static function isBeforeMethod(ReflectionMethod $method)
|
||||
@@ -998,8 +1059,10 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReflectionMethod $method
|
||||
* @param ReflectionMethod $method
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.0.8
|
||||
*/
|
||||
private static function isAfterClassMethod(ReflectionMethod $method)
|
||||
@@ -1008,8 +1071,10 @@ class PHPUnit_Util_Test
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReflectionMethod $method
|
||||
* @param ReflectionMethod $method
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since Method available since Release 4.0.8
|
||||
*/
|
||||
private static function isAfterMethod(ReflectionMethod $method)
|
||||
|
@@ -33,7 +33,8 @@ class PHPUnit_Util_TestDox_NamePrettifier
|
||||
/**
|
||||
* Prettifies the name of a test class.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function prettifyTestClass($name)
|
||||
@@ -60,7 +61,8 @@ class PHPUnit_Util_TestDox_NamePrettifier
|
||||
/**
|
||||
* Prettifies the name of a test method.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function prettifyTestMethod($name)
|
||||
|
@@ -151,6 +151,7 @@ abstract class PHPUnit_Util_TestDox_ResultPrinter extends PHPUnit_Util_Printer i
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 4.0.0
|
||||
*/
|
||||
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
@@ -169,6 +170,7 @@ abstract class PHPUnit_Util_TestDox_ResultPrinter extends PHPUnit_Util_Printer i
|
||||
* @param PHPUnit_Framework_Test $test
|
||||
* @param Exception $e
|
||||
* @param float $time
|
||||
*
|
||||
* @since Method available since Release 3.0.0
|
||||
*/
|
||||
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
|
||||
@@ -185,6 +187,7 @@ abstract class PHPUnit_Util_TestDox_ResultPrinter extends PHPUnit_Util_Printer i
|
||||
* A testsuite started.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
@@ -195,6 +198,7 @@ abstract class PHPUnit_Util_TestDox_ResultPrinter extends PHPUnit_Util_Printer i
|
||||
* A testsuite ended.
|
||||
*
|
||||
* @param PHPUnit_Framework_TestSuite $suite
|
||||
*
|
||||
* @since Method available since Release 2.2.0
|
||||
*/
|
||||
public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
|
||||
|
82
code/vendor/phpunit/phpunit/src/Util/XML.php
vendored
82
code/vendor/phpunit/phpunit/src/Util/XML.php
vendored
@@ -21,8 +21,10 @@ class PHPUnit_Util_XML
|
||||
* and FFFF (not even as character reference).
|
||||
* See http://www.w3.org/TR/xml/#charsets
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $string
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.4.6
|
||||
*/
|
||||
public static function prepareString($string)
|
||||
@@ -41,11 +43,13 @@ class PHPUnit_Util_XML
|
||||
/**
|
||||
* Loads an XML (or HTML) file into a DOMDocument object.
|
||||
*
|
||||
* @param string $filename
|
||||
* @param bool $isHtml
|
||||
* @param bool $xinclude
|
||||
* @param bool $strict
|
||||
* @param string $filename
|
||||
* @param bool $isHtml
|
||||
* @param bool $xinclude
|
||||
* @param bool $strict
|
||||
*
|
||||
* @return DOMDocument
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function loadFile($filename, $isHtml = false, $xinclude = false, $strict = false)
|
||||
@@ -80,12 +84,14 @@ class PHPUnit_Util_XML
|
||||
* not a string as it currently does. To load a file into a
|
||||
* DOMDocument, use loadFile() instead.
|
||||
*
|
||||
* @param string|DOMDocument $actual
|
||||
* @param bool $isHtml
|
||||
* @param string $filename
|
||||
* @param bool $xinclude
|
||||
* @param bool $strict
|
||||
* @param string|DOMDocument $actual
|
||||
* @param bool $isHtml
|
||||
* @param string $filename
|
||||
* @param bool $xinclude
|
||||
* @param bool $strict
|
||||
*
|
||||
* @return DOMDocument
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function load($actual, $isHtml = false, $filename = '', $xinclude = false, $strict = false)
|
||||
@@ -100,7 +106,7 @@ class PHPUnit_Util_XML
|
||||
@chdir(dirname($filename));
|
||||
}
|
||||
|
||||
$document = new DOMDocument;
|
||||
$document = new DOMDocument;
|
||||
$document->preserveWhiteSpace = false;
|
||||
|
||||
$internal = libxml_use_internal_errors(true);
|
||||
@@ -151,8 +157,10 @@ class PHPUnit_Util_XML
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DOMNode $node
|
||||
* @param DOMNode $node
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function nodeToText(DOMNode $node)
|
||||
@@ -172,6 +180,7 @@ class PHPUnit_Util_XML
|
||||
|
||||
/**
|
||||
* @param DOMNode $node
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function removeCharacterDataNodes(DOMNode $node)
|
||||
@@ -188,8 +197,10 @@ class PHPUnit_Util_XML
|
||||
/**
|
||||
* "Convert" a DOMElement object into a PHP variable.
|
||||
*
|
||||
* @param DOMElement $element
|
||||
* @param DOMElement $element
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function xmlToVariable(DOMElement $element)
|
||||
@@ -256,10 +267,13 @@ class PHPUnit_Util_XML
|
||||
/**
|
||||
* Validate list of keys in the associative array.
|
||||
*
|
||||
* @param array $hash
|
||||
* @param array $validKeys
|
||||
* @param array $hash
|
||||
* @param array $validKeys
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws PHPUnit_Framework_Exception
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function assertValidKeys(array $hash, array $validKeys)
|
||||
@@ -301,9 +315,11 @@ class PHPUnit_Util_XML
|
||||
* Parse a CSS selector into an associative array suitable for
|
||||
* use with findNodes().
|
||||
*
|
||||
* @param string $selector
|
||||
* @param mixed $content
|
||||
* @param string $selector
|
||||
* @param mixed $content
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function convertSelectToTag($selector, $content = true)
|
||||
@@ -435,11 +451,13 @@ class PHPUnit_Util_XML
|
||||
* The $actual document may be a DOMDocument or a string
|
||||
* containing XML or HTML, identified by $isHtml.
|
||||
*
|
||||
* @param array $selector
|
||||
* @param string $content
|
||||
* @param mixed $actual
|
||||
* @param bool $isHtml
|
||||
* @param array $selector
|
||||
* @param string $content
|
||||
* @param mixed $actual
|
||||
* @param bool $isHtml
|
||||
*
|
||||
* @return bool|array
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function cssSelect($selector, $content, $actual, $isHtml = true)
|
||||
@@ -454,10 +472,12 @@ class PHPUnit_Util_XML
|
||||
/**
|
||||
* Parse out the options from the tag using DOM object tree.
|
||||
*
|
||||
* @param DOMDocument $dom
|
||||
* @param array $options
|
||||
* @param bool $isHtml
|
||||
* @param DOMDocument $dom
|
||||
* @param array $options
|
||||
* @param bool $isHtml
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
public static function findNodes(DOMDocument $dom, array $options, $isHtml = true)
|
||||
@@ -836,8 +856,10 @@ class PHPUnit_Util_XML
|
||||
/**
|
||||
* Recursively get flat array of all descendants of this node.
|
||||
*
|
||||
* @param DOMNode $node
|
||||
* @param DOMNode $node
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
protected static function getDescendants(DOMNode $node)
|
||||
@@ -861,9 +883,11 @@ class PHPUnit_Util_XML
|
||||
/**
|
||||
* Gets elements by case insensitive tagname.
|
||||
*
|
||||
* @param DOMDocument $dom
|
||||
* @param string $tag
|
||||
* @param DOMDocument $dom
|
||||
* @param string $tag
|
||||
*
|
||||
* @return DOMNodeList
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
protected static function getElementsByCaseInsensitiveTagName(DOMDocument $dom, $tag)
|
||||
@@ -880,8 +904,10 @@ class PHPUnit_Util_XML
|
||||
/**
|
||||
* Get the text value of this node's child text node.
|
||||
*
|
||||
* @param DOMNode $node
|
||||
* @param DOMNode $node
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since Method available since Release 3.3.0
|
||||
*/
|
||||
protected static function getNodeText(DOMNode $node)
|
||||
|
@@ -24,7 +24,6 @@ class Extensions_PhptTestCaseTest extends \PHPUnit_Framework_TestCase
|
||||
);
|
||||
|
||||
$this->assertEquals($expected, $settings);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -738,9 +738,9 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase
|
||||
array(NAN, NAN),
|
||||
// arrays
|
||||
array(array(), array(0 => 1)),
|
||||
array(array(0 => 1), array()),
|
||||
array(array(0 => null), array()),
|
||||
array(array(0 => 1, 1 => 2), array(0 => 1, 1 => 3)),
|
||||
array(array(0 => 1), array()),
|
||||
array(array(0 => null), array()),
|
||||
array(array(0 => 1, 1 => 2), array(0 => 1, 1 => 3)),
|
||||
array(array('a', 'b' => array(1, 2)), array('a', 'b' => array(2, 1))),
|
||||
// objects
|
||||
array(new SampleClass(4, 8, 15), new SampleClass(16, 23, 42)),
|
||||
@@ -821,7 +821,7 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase
|
||||
// different types
|
||||
array(new SampleClass(4, 8, 15), false),
|
||||
array(false, new SampleClass(4, 8, 15)),
|
||||
array(array(0 => 1, 1 => 2), false),
|
||||
array(array(0 => 1, 1 => 2), false),
|
||||
array(false, array(0 => 1, 1 => 2)),
|
||||
array(array(), new stdClass),
|
||||
array(new stdClass, array()),
|
||||
|
@@ -39,10 +39,10 @@ class Framework_Constraint_JsonMatchesTest extends PHPUnit_Framework_TestCase
|
||||
public static function evaluateDataprovider()
|
||||
{
|
||||
return array(
|
||||
'valid JSON' => array(true, json_encode(array('Mascott' => 'Tux')), json_encode(array('Mascott' => 'Tux'))),
|
||||
'error syntax' => array(false, '{"Mascott"::}', json_encode(array('Mascott' => 'Tux'))),
|
||||
'valid JSON' => array(true, json_encode(array('Mascott' => 'Tux')), json_encode(array('Mascott' => 'Tux'))),
|
||||
'error syntax' => array(false, '{"Mascott"::}', json_encode(array('Mascott' => 'Tux'))),
|
||||
'error UTF-8' => array(false, json_encode('\xB1\x31'), json_encode(array('Mascott' => 'Tux'))),
|
||||
'invalid JSON in class instantiation' => array(false, json_encode(array('Mascott' => 'Tux')), '{"Mascott"::}'),
|
||||
'invalid JSON in class instantiation' => array(false, json_encode(array('Mascott' => 'Tux')), '{"Mascott"::}'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -856,14 +856,12 @@ Failed asserting that two objects are equal.
|
||||
- 'obj' => stdClass Object &$ahash (
|
||||
- 'foo' => 'bar'
|
||||
- )
|
||||
- 'inf' => null
|
||||
- )
|
||||
- '$bhash' => Array &1 (
|
||||
+SplObjectStorage Object &$storage2hash (
|
||||
+ '$bhash' => Array &0 (
|
||||
'obj' => stdClass Object &$bhash ()
|
||||
+ 'obj' => stdClass Object &$bhash ()
|
||||
'inf' => null
|
||||
)
|
||||
- '$bhash' => Array &0
|
||||
)
|
||||
|
||||
EOF
|
||||
@@ -3480,7 +3478,8 @@ EOF
|
||||
/**
|
||||
* Removes spaces in front of newlines
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function trimnl($string)
|
||||
|
@@ -2,8 +2,9 @@
|
||||
GH-1348: STDOUT/STDERR IO streams should exist in process isolation
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (defined('HHVM_VERSION'))
|
||||
if (defined('HHVM_VERSION')) {
|
||||
print 'skip: PHP runtime required';
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
@@ -5,4 +5,4 @@ class Issue1570Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
print '*';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ phpunit --log-json php://stdout BankAccountTest ../_files/BankAccountTest.php
|
||||
<?php
|
||||
if (!defined('JSON_PRETTY_PRINT')) {
|
||||
print 'skip: JSON_PRETTY_PRINT is required';
|
||||
} else if (json_encode(array(), JSON_PRETTY_PRINT) != '[]') {
|
||||
} elseif (json_encode(array(), JSON_PRETTY_PRINT) != '[]') {
|
||||
print 'skip: Does not have PHP #66021 (Blank line inside empty JSON array/object)';
|
||||
}
|
||||
?>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user