Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch '3.7' of github.com:sebastianbergmann/phpunit into 3.7

  • Loading branch information...
commit 8c7598eb8b0512bab6dae4a2f6324296c499f85f 2 parents af63337 + 0396604
Sebastian Bergmann authored
3  ChangeLog.md
View
@@ -8,6 +8,7 @@ PHPUnit 3.7.2
* Implemented #656: Always clean up mock objects (and free up memory).
* Added the `addUncoveredFilesFromWhitelist` configuration setting back in.
+* Fixed #655: Reverted 'More than two positional arguments provided' check as it turned out to be a BC issue.
* Disable token caching (in PHP_TokenStream, used by PHP_CodeCoverage) by default (to reduce memory footprint).
PHPUnit 3.7.1
@@ -45,6 +46,6 @@ PHPUnit 3.7.0
* 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.
+* Removed deprecated `--skeleton-class` and `--skeleton-test` switches. The functionality is now provided by the `phpunit-skelgen` command of the `PHPUnit_SkeletonGenerator` package.
* Removed deprecated `PHPUnit_Extensions_OutputTestCase` class.
2  PHPUnit/Runner/StandardTestSuiteLoader.php
View
@@ -134,7 +134,7 @@ public function load($suiteClassName, $suiteClassFile = '')
throw new PHPUnit_Framework_Exception(
sprintf(
- 'Class %s could not be found in %s.',
+ "Class '%s' could not be found in '%s'.",
$suiteClassName,
$suiteClassFile
8 PHPUnit/TextUI/Command.php
View
@@ -514,14 +514,6 @@ protected function handleArguments(array $argv)
$this->handleCustomTestSuite();
if (!isset($this->arguments['test'])) {
- if (count($this->options[1]) > 2) {
- $this->showMessage(
- 'More than two positional arguments provided.',
- FALSE
- );
- $this->showHelp();
- exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
- }
if (isset($this->options[1][0])) {
$this->arguments['test'] = $this->options[1][0];
2  PHPUnit/TextUI/TestRunner.php
View
@@ -421,7 +421,7 @@ public function setPrinter(PHPUnit_TextUI_ResultPrinter $resultPrinter)
protected function runFailed($message)
{
self::printVersionString();
- self::write($message);
+ self::write($message . PHP_EOL);
exit(self::FAILURE_EXIT);
}
6 Tests/TextUI/log-xml.phpt
View
@@ -19,9 +19,9 @@ PHPUnit %s by Sebastian Bergmann.
...<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="BankAccountTest" file="%sBankAccountTest.php" fullPackage="PHPUnit" package="PHPUnit" tests="3" assertions="3" failures="0" errors="0" time="%f">
- <testcase name="testBalanceIsInitiallyZero" class="BankAccountTest" file="%sBankAccountTest.php" line="73" assertions="1" time="%f"/>
- <testcase name="testBalanceCannotBecomeNegative" class="BankAccountTest" file="%sBankAccountTest.php" line="83" assertions="1" time="%f"/>
- <testcase name="testBalanceCannotBecomeNegative2" class="BankAccountTest" file="%sBankAccountTest.php" line="103" assertions="1" time="%f"/>
+ <testcase name="testBalanceIsInitiallyZero" class="BankAccountTest" file="%sBankAccountTest.php" line="72" assertions="1" time="%f"/>
+ <testcase name="testBalanceCannotBecomeNegative" class="BankAccountTest" file="%sBankAccountTest.php" line="82" assertions="1" time="%f"/>
+ <testcase name="testBalanceCannotBecomeNegative2" class="BankAccountTest" file="%sBankAccountTest.php" line="102" assertions="1" time="%f"/>
</testsuite>
</testsuites>
18 Tests/TextUI/positional-arguments.phpt
View
@@ -1,18 +0,0 @@
---TEST--
-phpunit FailureTest ../_files/FailureTest.php SomethingElse
---FILE--
-<?php
-$_SERVER['argv'][1] = '--no-configuration';
-$_SERVER['argv'][2] = 'FailureTest';
-$_SERVER['argv'][3] = dirname(dirname(__FILE__)) . '/_files/FailureTest.php';
-$_SERVER['argv'][4] = 'SomethingElse';
-
-require_once dirname(dirname(dirname(__FILE__))) . '/PHPUnit/Autoload.php';
-PHPUnit_TextUI_Command::main();
-?>
---EXPECTF--
-PHPUnit %s by Sebastian Bergmann.
-
-More than two positional arguments provided.
-
-Usage: %s
Please sign in to comment.
Something went wrong with that request. Please try again.