Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
commit 095005d13efff86973a8ed91d5ea445677eea823 2 parents 82f2433 + 87d0e1a
@claylo claylo authored
View
55 CONTRIBUTING.md
@@ -0,0 +1,55 @@
+Contributing to PHPUnit
+=======================
+
+Contributions to PHPUnit, its related modules, and its documentation are always welcome. You make our lifes easier by sending us your contributions through GitHub pull requests.
+
+Please note that the `3.6.` branch is closed for features and that pull requests should to be based on `master` or the `3.7.` once it exists.
+
+We are trying to keep backwards compatibility breaks in PHPUnit 3.7 to an absolute minimum so please take this into account when proposing changes.
+
+Due to time constraints, we are not always able to respond as quickly as we would like. Please do not take delays personal and feel free to remind us here or on IRC if you feel that we forgot to respond.
+
+Using PHPUnit From a Git Checkout
+---------------------------------
+
+The following commands can be used to perform the initial checkout of PHPUnit and its dependencies from Git:
+
+ mkdir phpunit && cd phpunit
+ git clone git://github.com/sebastianbergmann/phpunit.git
+ git clone git://github.com/sebastianbergmann/dbunit.git
+ git clone git://github.com/sebastianbergmann/php-file-iterator.git
+ git clone git://github.com/sebastianbergmann/php-text-template.git
+ git clone git://github.com/sebastianbergmann/php-code-coverage.git
+ git clone git://github.com/sebastianbergmann/php-token-stream.git
+ git clone git://github.com/sebastianbergmann/php-timer.git
+ git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git
+ git clone git://github.com/sebastianbergmann/phpunit-selenium.git
+ git clone git://github.com/sebastianbergmann/phpunit-story.git
+ git clone git://github.com/sebastianbergmann/php-invoker.git
+
+The `dbunit`, `php-code-coverage`, `php-file-iterator`, `php-text-template`, `php-timer`, `php-token-stream`, `phpunit`, `phpunit-mock-objects`, `phpunit-selenium`, `phpunit-story`, and `php-invoker` directories need to be added to the `include_path`.
+
+In addition to the checkouts listed above, the YAML component that is provided by the Symfony project is required:
+
+ pear install pear.symfony.com/Yaml
+
+The `phpunit/phpunit.php` script can be used to invoke the PHPUnit test runner.
+
+Running the test suite(s)
+-------------------------
+
+It is not possible to use a system-wide installed version of PHPUnit to run the test suite of a Git checkout. Because of that is is necessary to change the `include_paths` as described below.
+
+This can be achieved with a small wrapper script designed to work with every module in the PHPUnit stack.
+
+Note that you might have to change the path to your PEAR installation here pointing to `/usr/local/lib/php`. You can find it using `pear config-show | grep php_dir`.
+
+### Linux / MacOS X
+
+ #!/bin/bash
+ php -d include_path='.:../phpunit/:../dbunit/:../php-code-coverage/:../php-file-iterator/:../php-invoker/:../php-text-template/:../php-timer:../php-token-stream:../phpunit-mock-objects/:../phpunit-selenium/:../phpunit-story/:/usr/local/lib/php' ../phpunit/phpunit.php $*
+
+### Windows
+
+ @echo off
+ php -d include_path='.;../phpunit/;../dbunit/;../php-code-coverage/;../php-file-iterator/;../php-invoker/;../php-text-template/;../php-timer;../php-token-stream;../phpunit-mock-objects/;../phpunit-selenium/;../phpunit-story/;C:/Program Files/PHP/pear' ../phpunit/phpunit.php %*
View
7 ChangeLog.markdown → ChangeLog.md
@@ -6,7 +6,7 @@ This is the list of changes for the PHPUnit 3.7 release series.
PHPUnit 3.7.0
-------------
-* PHPUnit 3.7 is only supported on PHP 5.3.3 (or later) and PHP 5.4.0 (or later) is highly recommended.
+* PHPUnit 3.7 is only supported on PHP 5.3.3 (or later) and PHP 5.4.6 (or later) is highly recommended.
* Implemented #200: When using process-isolation don't die silently when unserializing the test result fails.
* Implemented #206: Added a `callback` constraint that is useful for making complex assertions.
* Implemented #207: Restore current working directory if is changed by a test case.
@@ -21,13 +21,16 @@ PHPUnit 3.7.0
* Implemented #512: Test listeners now trigger one autoload call instead of being silently ignored when the class was not loaded.
* Implemented #514: Failed `assertStringMatchesFormat()` calls now produce a better readable diff by only marking lines as different that don't match the format specifiers.
* Implemented #515: Added `assertContainsOnlyInstancesOf()` to help checking Collection objects and arrays with a descriptive assertion.
-* Implemented #516: When an `@expectedException` fails it now shows the message of the thrown exception to ease debugging.
+* Implemented #561: When an `@expectedException` fails it now shows the message of the thrown exception to ease debugging.
* Implemented #586: Improved reporting of exceptions by printing out the previous exception names, messages and traces.
* The `@requires` annotation can now be used on the class DocBlock. Required versions can be overridden in the methods annotation, required functions and extensions will be merged.
* Added `processUncoveredFilesFromWhitelist` configuration setting. When enabled, uncovered whitelisted files are processed to properly calculate the number of executable lines.
* Fixed #322 #320 thanks to #607: Commandline option now override group/exclude settings in phpunit.xml
* Fixed #440: Possible crash when using `--process-isolation` with PHP 5.3 and `detect_unicode=on`.
* Fixed #523: `assertAttributeEquals()` now works with classes extending internal classes like `ArrayIterator`.
+* Fixed #581: Generating a diffs could add extra newlines in Windows.
+* Fixed #636, #631: Using selenium in combination with autoloaders that die()d or produced errors when a class could't be found caused led to broken tests.
+* If no tests where executed, for example because of a `--filter`, PHPUnit now prints a "No tests executed" warning instead of "OK (0 tests...)".
* It is possible again to expect the generic `Exception` class.
* Removed `addUncoveredFilesFromWhitelist` configuration setting.
* Removed deprecated `--skeleton-class` and `--skeleton-test` switches. The functionality is now provided by the `phpunit-skel` command of the `PHPUnit_SkeletonGenerator` package.
View
4 PHPUnit/Framework/Assert.php
@@ -1382,7 +1382,7 @@ public static function assertNotRegExp($pattern, $string, $message = '')
* @param array|Countable|Iterator $actual
* @param string $message
*/
- public function assertSameSize($expected, $actual, $message = '')
+ public static function assertSameSize($expected, $actual, $message = '')
{
if (!$expected instanceof Countable &&
!$expected instanceof Iterator &&
@@ -1411,7 +1411,7 @@ public function assertSameSize($expected, $actual, $message = '')
* @param array|Countable|Iterator $actual
* @param string $message
*/
- public function assertNotSameSize($expected, $actual, $message = '')
+ public static function assertNotSameSize($expected, $actual, $message = '')
{
if (!$expected instanceof Countable &&
!$expected instanceof Iterator &&
View
8 PHPUnit/Framework/TestCase.php
@@ -1297,7 +1297,7 @@ protected function setLocale()
* @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 = TRUE)
+ public function getMock($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = TRUE, $callOriginalClone = TRUE, $callAutoload = TRUE, $cloneArguments = FALSE)
{
$mockObject = PHPUnit_Framework_MockObject_Generator::getMock(
$originalClassName,
@@ -1344,7 +1344,7 @@ public function getMockBuilder($className)
* @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 = TRUE)
+ protected function getMockClass($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = FALSE, $callOriginalClone = TRUE, $callAutoload = TRUE, $cloneArguments = FALSE)
{
$mock = $this->getMock(
$originalClassName,
@@ -1377,7 +1377,7 @@ protected function getMockClass($originalClassName, $methods = array(), array $a
* @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 = TRUE)
+ public function getMockForAbstractClass($originalClassName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = TRUE, $callOriginalClone = TRUE, $callAutoload = TRUE, $mockedMethods = array(), $cloneArguments = FALSE)
{
$mockObject = PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass(
$originalClassName,
@@ -1447,7 +1447,7 @@ protected function getMockFromWsdl($wsdlFile, $originalClassName = '', $mockClas
* @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 = TRUE)
+ protected function getObjectForTrait($traitName, array $arguments = array(), $traitClassName = '', $callOriginalConstructor = TRUE, $callOriginalClone = TRUE, $callAutoload = TRUE, $cloneArguments = FALSE)
{
return PHPUnit_Framework_MockObject_Generator::getObjectForTrait(
$traitName,
View
6 PHPUnit/Framework/TestSuite.php
@@ -649,6 +649,9 @@ public function run(PHPUnit_Framework_TestResult $result = NULL, $filter = FALSE
$this->setUp();
if ($this->testCase &&
+ // Some extensions use test names that are not classes;
+ // The method_exists() triggers an autoload call that causes issues with die()ing autoloaders.
+ class_exists($this->name, false) &&
method_exists($this->name, 'setUpBeforeClass')) {
call_user_func(array($this->name, 'setUpBeforeClass'));
}
@@ -747,6 +750,9 @@ public function run(PHPUnit_Framework_TestResult $result = NULL, $filter = FALSE
if ($doSetup) {
if ($this->testCase &&
+ // Some extensions use test names that are not classes;
+ // The method_exists() triggers an autoload call that causes issues with die()ing autoloaders.
+ class_exists($this->name, false) &&
method_exists($this->name, 'tearDownAfterClass')) {
call_user_func(array($this->name, 'tearDownAfterClass'));
}
View
35 PHPUnit/TextUI/ResultPrinter.php
@@ -275,16 +275,17 @@ protected function printDefectTrace(PHPUnit_Framework_TestFailure $defect)
)
);
- $e = $defect->thrownException()->getPrevious();
+ $e = $defect->thrownException()->getPrevious();
+
while ($e) {
- $this->write(
- "\nCaused by\n" .
- PHPUnit_Framework_TestFailure::exceptionToString($e). "\n" .
- PHPUnit_Util_Filter::getFilteredStacktrace($e)
- );
- $e = $e->getPrevious();
- }
-
+ $this->write(
+ "\nCaused by\n" .
+ PHPUnit_Framework_TestFailure::exceptionToString($e). "\n" .
+ PHPUnit_Util_Filter::getFilteredStacktrace($e)
+ );
+
+ $e = $e->getPrevious();
+ }
}
/**
@@ -342,7 +343,21 @@ protected function printHeader()
*/
protected function printFooter(PHPUnit_Framework_TestResult $result)
{
- if ($result->wasSuccessful() &&
+ if (count($result) === 0) {
+ if ($this->colors) {
+ $this->write("\x1b[30;43m\x1b[2K");
+ }
+
+ $this->write(
+ "No tests executed!\n"
+ );
+
+ if ($this->colors) {
+ $this->write("\x1b[0m\x1b[2K");
+ }
+ }
+
+ else if ($result->wasSuccessful() &&
$result->allCompletlyImplemented() &&
$result->noneSkipped()) {
if ($this->colors) {
View
18 PHPUnit/TextUI/TestRunner.php
@@ -362,11 +362,13 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
$writer = new PHP_CodeCoverage_Report_HTML(
$title,
$arguments['reportCharset'],
- $arguments['reportYUI'],
$arguments['reportHighlight'],
$arguments['reportLowUpperBound'],
$arguments['reportHighLowerBound'],
- ' and PHPUnit ' . PHPUnit_Runner_Version::id()
+ sprintf(
+ ' and <a href="http://phpunit.de/">PHPUnit %s</a>',
+ PHPUnit_Runner_Version::id()
+ )
);
$writer->process($codeCoverage, $arguments['reportDirectory']);
@@ -388,10 +390,6 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
}
if (isset($arguments['coverageText'])) {
- $this->printer->write(
- "\nGenerating code coverage report in text format ..."
- );
-
if ($arguments['coverageText'] == 'php://stdout') {
$outputStream = $this->printer;
$colors = (bool)$arguments['colors'];
@@ -409,8 +407,6 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
);
$writer->process($codeCoverage, $colors);
-
- $this->printer->write(" done\n");
}
}
@@ -643,11 +639,6 @@ protected function handleConfiguration(array &$arguments)
$arguments['reportCharset'] = $loggingConfiguration['charset'];
}
- if (isset($loggingConfiguration['yui']) &&
- !isset($arguments['reportYUI'])) {
- $arguments['reportYUI'] = $loggingConfiguration['yui'];
- }
-
if (isset($loggingConfiguration['highlight']) &&
!isset($arguments['reportHighlight'])) {
$arguments['reportHighlight'] = $loggingConfiguration['highlight'];
@@ -790,7 +781,6 @@ protected function handleConfiguration(array &$arguments)
$arguments['reportHighlight'] = isset($arguments['reportHighlight']) ? $arguments['reportHighlight'] : FALSE;
$arguments['reportHighLowerBound'] = isset($arguments['reportHighLowerBound']) ? $arguments['reportHighLowerBound'] : 70;
$arguments['reportLowUpperBound'] = isset($arguments['reportLowUpperBound']) ? $arguments['reportLowUpperBound'] : 35;
- $arguments['reportYUI'] = isset($arguments['reportYUI']) ? $arguments['reportYUI'] : TRUE;
$arguments['stopOnError'] = isset($arguments['stopOnError']) ? $arguments['stopOnError'] : FALSE;
$arguments['stopOnFailure'] = isset($arguments['stopOnFailure']) ? $arguments['stopOnFailure'] : FALSE;
$arguments['stopOnIncomplete'] = isset($arguments['stopOnIncomplete']) ? $arguments['stopOnIncomplete'] : FALSE;
View
7 PHPUnit/Util/Class.php
@@ -138,8 +138,11 @@ public static function getMethodParameters($method, $forCall = FALSE)
foreach ($method->getParameters() as $i => $parameter) {
$name = '$' . $parameter->getName();
- if ($name === '$') {
- $name .= 'arg' . $i;
+ /* Note: PHP extensions may use empty names for reference arguments
+ * or "..." for methods taking a variable number of arguments.
+ */
+ if ($name === '$' || $name === '$...') {
+ $name = '$arg' . $i;
}
$default = '';
View
9 PHPUnit/Util/Configuration.php
@@ -129,7 +129,7 @@
*
* <logging>
* <log type="coverage-html" target="/tmp/report" title="My Project"
- charset="UTF-8" yui="true" highlight="false"
+ charset="UTF-8" highlight="false"
* lowUpperBound="35" highLowerBound="70"/>
* <log type="coverage-clover" target="/tmp/clover.xml"/>
* <log type="json" target="/tmp/logfile.json"/>
@@ -404,13 +404,6 @@ public function getLoggingConfiguration()
$result['highLowerBound'] = (string)$log->getAttribute('highLowerBound');
}
- if ($log->hasAttribute('yui')) {
- $result['yui'] = $this->getBoolean(
- (string)$log->getAttribute('yui'),
- TRUE
- );
- }
-
if ($log->hasAttribute('highlight')) {
$result['highlight'] = $this->getBoolean(
(string)$log->getAttribute('highlight'),
View
2  PHPUnit/Util/Type.php
@@ -133,7 +133,7 @@ protected static function recursiveExport($value, $indentation, &$processedObjec
}
return "'" .
- str_replace(array("\n\r", "\r"), array("\n", "\n"), $value) .
+ str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) .
"'";
}
View
121 README.markdown
@@ -1,121 +0,0 @@
-PHPUnit
-=======
-
-PHPUnit is the de-facto standard for unit testing in PHP projects. It provides both a framework that makes the writing of tests easy as well as the functionality to easily run the tests and analyse their results.
-
-Requirements
-------------
-
-* PHPUnit 3.7 requires PHP 5.3.3 (or later) but PHP 5.4.0 (or later) is highly recommended.
-* [PHP_CodeCoverage](http://github.com/sebastianbergmann/php-code-coverage), the library that is used by PHPUnit to collect and process code coverage information, depends on [Xdebug](http://xdebug.org/) 2.0.5 (or later) but Xdebug 2.2.0 (or later) is highly recommended.
-
-Installation
-------------
-
-PHPUnit should be installed using the PEAR Installer, the backbone of the [PHP Extension and Application Repository](http://pear.php.net/) that provides a distribution system for PHP packages.
-
-Depending on your OS distribution and/or your PHP environment, you may need to install PEAR or update your existing PEAR installation before you can proceed with the following instructions. `sudo pear upgrade PEAR` usually suffices to upgrade an existing PEAR installation. The [PEAR Manual ](http://pear.php.net/manual/en/installation.getting.php) explains how to perform a fresh installation of PEAR.
-
-The following two commands (which you may have to run as `root`) are all that is required to install PHPUnit using the PEAR Installer:
-
- pear config-set auto_discover 1
- pear install pear.phpunit.de/PHPUnit
-
-After the installation you can find the PHPUnit source files inside your local PEAR directory; the path is usually `/usr/lib/php/PHPUnit`.
-
-Documentation
--------------
-
-The documentation for PHPUnit is available in different formats:
-
-* [English, multiple HTML files](http://www.phpunit.de/manual/3.7/en/index.html)
-* [English, single HTML file](http://www.phpunit.de/manual/3.7/en/phpunit-book.html)
-* [English, PDF](http://www.phpunit.de/manual/3.7/en/phpunit-book.pdf)
-* [English, ePub](http://www.phpunit.de/manual/3.7/en/phpunit-book.epub)
-* [French, multiple HTML files](http://www.phpunit.de/manual/3.7/fr/index.html)
-* [French, single HTML file](http://www.phpunit.de/manual/3.7/fr/phpunit-book.html)
-* [French, PDF](http://www.phpunit.de/manual/3.7/fr/phpunit-book.pdf)
-* [French, ePub](http://www.phpunit.de/manual/3.7/fr/phpunit-book.epub)
-* [Japanese, multiple HTML files](http://www.phpunit.de/manual/3.7/ja/index.html)
-* [Japanese, single HTML file](http://www.phpunit.de/manual/3.7/ja/phpunit-book.html)
-* [Japanese, PDF](http://www.phpunit.de/manual/3.7/ja/phpunit-book.pdf)
-* [Japanese, ePub](http://www.phpunit.de/manual/3.7/ja/phpunit-book.epub)
-
-IRC
----
-
-The [#phpunit channel on the Freenode IRC network](irc://freenode.net/phpunit) is a place to chat about PHPUnit.
-
-Using PHPUnit From a Git Checkout
----------------------------------
-
-The following commands can be used to perform the initial checkout of PHPUnit and its dependencies from Git:
-
- mkdir phpunit && cd phpunit
- git clone git://github.com/sebastianbergmann/phpunit.git
- git clone git://github.com/sebastianbergmann/dbunit.git
- git clone git://github.com/sebastianbergmann/php-file-iterator.git
- git clone git://github.com/sebastianbergmann/php-text-template.git
- git clone git://github.com/sebastianbergmann/php-code-coverage.git
- git clone git://github.com/sebastianbergmann/php-token-stream.git
- git clone git://github.com/sebastianbergmann/php-timer.git
- git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git
- git clone git://github.com/sebastianbergmann/phpunit-selenium.git
- git clone git://github.com/sebastianbergmann/phpunit-story.git
- git clone git://github.com/sebastianbergmann/php-invoker.git
-
-The `dbunit`, `php-code-coverage`, `php-file-iterator`, `php-text-template`, `php-timer`, `php-token-stream`, `phpunit`, `phpunit-mock-objects`, `phpunit-selenium`, `phpunit-story`, and `php-invoker` directories need to be added to the `include_path`.
-
-In addition to the checkouts listed above, the YAML component that is provided by the Symfony project is required:
-
- pear install pear.symfony.com/Yaml
-
-The `phpunit/phpunit.php` script can be used to invoke the PHPUnit test runner.
-
-Contributing
-------------
-
-Contributions to PHPUnit, its related modules and its documentation are always welcome and best done using GitHub pull request.
-
-Please note that the `3.6.` branch is closed for features and that pull requests should to be based on `master` or the `3.7.` once it exists.
-
-We are trying to keep BC breaks in PHPUnit 3.7 to a absolute minimum so please take this into account when proposing changes.
-
-Due to time constraints we are not always able to respond as quickly as we'd like to so please do not take delays personal and feel free to remind us here or on IRC if you feel that we forgot to respond.
-
-### List of Contributors
-
-Thanks to everyone that has contributed to PHPUnit! You can find a detailed contributors list on every PHPUnit related package on GitHub. This list shows only the bigger components:
-
-- [PHPUnit core](https://github.com/sebastianbergmann/phpunit/graphs/contributors)
-- [PHP code coverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors)
-- [PHPUnit mock objects](https://github.com/sebastianbergmann/phpunit-mock-objects/graphs/contributors)
-
-A very special thanks to everyone that has contributed to the documentation and helped maintaining the translations:
-
-- [PHPUnit Documentation](https://github.com/sebastianbergmann/phpunit-documentation/graphs/contributors)
-
-### Running the test suite(s)
-
-It's not possible to use a system wide installed version of PHPUnit to run the test suite of a git checkout. Because of that is is necessary to change the include paths like describe above.
-
-This can be achieved with a small wrapper script designed to work with every module in the PHPUnit stack.
-
-Note that you might have to change the path to your pear installation here pointing to `/usr/local/lib/php`. You can find it using `pear config-show | grep php_dir`
-
-**Linux/Mac**
-
-`run-tests.sh`
-
-> \#!/bin/bash
->
-> php -d include_path='.:../phpunit/:../dbunit/:../php-code-coverage/:../php-file-iterator/:../php-invoker/:../php-text-template/:../php-timer:../php-token-stream:../phpunit-mock-objects/:../phpunit-selenium/:../phpunit-story/:/usr/local/lib/php' ../phpunit/phpunit.php $*
-
-**Windows**
-
-`run-tests.bat`
-
-> @echo off
->
-> php -d include_path='.;../phpunit/;../dbunit/;../php-code-coverage/;../php-file-iterator/;../php-invoker/;../php-text-template/;../php-timer;../php-token-stream;../phpunit-mock-objects/;../phpunit-selenium/;../phpunit-story/;C:/Program Files/PHP/pear' ../phpunit/phpunit.php %*
-
View
62 README.md
@@ -0,0 +1,62 @@
+PHPUnit
+=======
+
+PHPUnit is the de-facto standard for unit testing in PHP projects. It provides both a framework that makes the writing of tests easy as well as the functionality to easily run the tests and analyse their results.
+
+Requirements
+------------
+
+* PHPUnit 3.7 requires PHP 5.3.3 (or later) but PHP 5.4.6 (or later) is highly recommended.
+* [PHP_CodeCoverage](http://github.com/sebastianbergmann/php-code-coverage), the library that is used by PHPUnit to collect and process code coverage information, depends on [Xdebug](http://xdebug.org/) 2.0.5 (or later) but Xdebug 2.2.1 (or later) is highly recommended.
+
+Installation
+------------
+
+PHPUnit should be installed using the PEAR Installer, the backbone of the [PHP Extension and Application Repository](http://pear.php.net/) that provides a distribution system for PHP packages.
+
+Depending on your OS distribution and/or your PHP environment, you may need to install PEAR or update your existing PEAR installation before you can proceed with the following instructions. `sudo pear upgrade PEAR` usually suffices to upgrade an existing PEAR installation. The [PEAR Manual ](http://pear.php.net/manual/en/installation.getting.php) explains how to perform a fresh installation of PEAR.
+
+The following two commands (which you may have to run as `root`) are all that is required to install PHPUnit using the PEAR Installer:
+
+ pear config-set auto_discover 1
+ pear install pear.phpunit.de/PHPUnit
+
+After the installation you can find the PHPUnit source files inside your local PEAR directory; the path is usually `/usr/lib/php/PHPUnit`.
+
+Documentation
+-------------
+
+The documentation for PHPUnit is available in different formats:
+
+* [English, multiple HTML files](http://www.phpunit.de/manual/3.7/en/index.html)
+* [English, single HTML file](http://www.phpunit.de/manual/3.7/en/phpunit-book.html)
+* [English, PDF](http://www.phpunit.de/manual/3.7/en/phpunit-book.pdf)
+* [English, ePub](http://www.phpunit.de/manual/3.7/en/phpunit-book.epub)
+* [French, multiple HTML files](http://www.phpunit.de/manual/3.7/fr/index.html)
+* [French, single HTML file](http://www.phpunit.de/manual/3.7/fr/phpunit-book.html)
+* [French, PDF](http://www.phpunit.de/manual/3.7/fr/phpunit-book.pdf)
+* [French, ePub](http://www.phpunit.de/manual/3.7/fr/phpunit-book.epub)
+* [Japanese, multiple HTML files](http://www.phpunit.de/manual/3.7/ja/index.html)
+* [Japanese, single HTML file](http://www.phpunit.de/manual/3.7/ja/phpunit-book.html)
+* [Japanese, PDF](http://www.phpunit.de/manual/3.7/ja/phpunit-book.pdf)
+* [Japanese, ePub](http://www.phpunit.de/manual/3.7/ja/phpunit-book.epub)
+
+IRC
+---
+
+The [#phpunit channel on the Freenode IRC network](irc://freenode.net/phpunit) is a place to chat about PHPUnit.
+
+List of Contributors
+--------------------
+
+Thanks to everyone who has contributed to PHPUnit! You can find a detailed list of contributors on every PHPUnit related package on GitHub. This list shows only the major components:
+
+- [PHPUnit](https://github.com/sebastianbergmann/phpunit/graphs/contributors)
+- [PHP_CodeCoverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors)
+- [PHPUnit_MockObject](https://github.com/sebastianbergmann/phpunit-mock-objects/graphs/contributors)
+
+A very special thanks to everyone who has contributed to the documentation and helps maintaining the translations:
+
+- [PHPUnit Documentation](https://github.com/sebastianbergmann/phpunit-documentation/graphs/contributors)
+
+Please refer to [CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) for information on how to contribute to PHPUnit and its related projects.
View
43 Tests/Regression/GitHub/581.phpt
@@ -0,0 +1,43 @@
+--TEST--
+GH-581: PHPUnit_Util_Type::export adds extra newlines in Windows
+--FILE--
+<?php
+
+$_SERVER['argv'][1] = '--no-configuration';
+$_SERVER['argv'][2] = 'Issue581Test';
+$_SERVER['argv'][3] = dirname(__FILE__).'/581/Issue581Test.php';
+
+require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/PHPUnit/Autoload.php';
+PHPUnit_TextUI_Command::main();
+?>
+--EXPECTF--
+PHPUnit %s by Sebastian Bergmann.
+
+F
+
+Time: %i %s, Memory: %sMb
+
+There was 1 failure:
+
+1) Issue581Test::testExportingObjectsDoesNotBreakWindowsLineFeeds
+Failed asserting that two objects are equal.
+--- Expected
++++ Actual
+@@ @@
+ stdClass Object (
+ 0 => 1
+ 1 => 2
+ 2 => 'Test\n'
+ 3 => 4
+- 4 => 5
++ 4 => 1
+ 5 => 6
+ 6 => 7
+ 7 => 8
+ )
+
+%s:%i
+
+FAILURES!
+Tests: 1, Assertions: 1, Failures: 1.
+
View
10 Tests/Regression/GitHub/581/Issue581Test.php
@@ -0,0 +1,10 @@
+<?php
+class Issue581Test extends PHPUnit_Framework_TestCase
+{
+ public function testExportingObjectsDoesNotBreakWindowsLineFeeds() {
+ $this->assertEquals(
+ (object)array(1,2,"Test\r\n",4,5,6,7,8),
+ (object)array(1,2,"Test\r\n",4,1,6,7,8)
+ );
+ }
+}
View
4 Tests/TextUI/fatal-isolation.phpt
@@ -23,9 +23,11 @@ There was 1 error:
1) FatalTest::testFatalError
PHPUnit_Framework_Exception: Fatal error: Call to undefined function non_existing_function() in %s
-Call Stack:
%s:%i
+Caused by
+ErrorException: unserialize(): Error at offset %i of %i bytes
+
%s:%i
FAILURES!
View
23 Tests/TextUI/filter-no-results.phpt
@@ -0,0 +1,23 @@
+--TEST--
+phpunit --filter testBalanceIsInitiallyZero BankAccountTest ../_files/BankAccountTest.php
+--FILE--
+<?php
+define('PHPUNIT_TESTSUITE', TRUE);
+
+$_SERVER['argv'][1] = '--no-configuration';
+$_SERVER['argv'][2] = '--filter';
+$_SERVER['argv'][3] = 'doesNotExist';
+$_SERVER['argv'][4] = 'BankAccountTest';
+$_SERVER['argv'][5] = dirname(__FILE__).'/../_files/BankAccountTest.php';
+
+require_once dirname(dirname(dirname(__FILE__))) . '/PHPUnit/Autoload.php';
+PHPUnit_TextUI_Command::main();
+?>
+--EXPECTF--
+PHPUnit %s by Sebastian Bergmann.
+
+
+
+Time: %i %s, Memory: %sMb
+
+No tests executed!
View
1  Tests/Util/ConfigurationTest.php
@@ -229,7 +229,6 @@ public function testLoggingConfigurationIsReadCorrectly()
'charset' => 'UTF-8',
'lowUpperBound' => '35',
'highLowerBound' => '70',
- 'yui' => TRUE,
'highlight' => FALSE,
'coverage-html' => '/tmp/report',
'coverage-clover' => '/tmp/clover.xml',
View
20 package.xml
@@ -17,14 +17,14 @@
<email>sebastian@phpunit.de</email>
<active>yes</active>
</lead>
- <date>2012-MM-DD</date>
+ <date>2012-09-17</date>
<version>
- <release>3.7.0</release>
+ <release>3.7.0RC5</release>
<api>3.7.0</api>
</version>
<stability>
- <release>devel</release>
- <api>devel</api>
+ <release>beta</release>
+ <api>beta</api>
</stability>
<license>The BSD 3-Clause License</license>
<notes>http://github.com/sebastianbergmann/phpunit/blob/master/README.markdown</notes>
@@ -449,7 +449,7 @@
<package>
<name>File_Iterator</name>
<channel>pear.phpunit.de</channel>
- <min>1.3.0</min>
+ <min>1.3.1</min>
</package>
<package>
<name>Text_Template</name>
@@ -459,22 +459,22 @@
<package>
<name>PHP_CodeCoverage</name>
<channel>pear.phpunit.de</channel>
- <min>1.1.0</min>
+ <min>1.2.0RC1</min>
</package>
<package>
<name>PHP_Timer</name>
<channel>pear.phpunit.de</channel>
- <min>1.0.1</min>
+ <min>1.0.2</min>
</package>
<package>
<name>PHPUnit_MockObject</name>
<channel>pear.phpunit.de</channel>
- <min>1.2.0</min>
+ <min>1.2.0RC1</min>
</package>
<package>
<name>Yaml</name>
<channel>pear.symfony.com</channel>
- <min>1.0.10</min>
+ <min>2.1.0RC1</min>
</package>
<extension>
<name>dom</name>
@@ -493,7 +493,7 @@
<package>
<name>PHP_Invoker</name>
<channel>pear.phpunit.de</channel>
- <min>1.0.0</min>
+ <min>1.1.0</min>
</package>
<extension>
<name>json</name>
Please sign in to comment.
Something went wrong with that request. Please try again.