Permalink
Browse files

- Merge [3406] and [3407].

  • Loading branch information...
1 parent 5e428ca commit 2ee1eaa6fcf07bade75ce3e03f771140a3e937b5 @sebastianbergmann committed Jul 10, 2008
View
2 PHPUnit/Tests/TextUI/coverage-clover.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/default.phpt
@@ -6,8 +6,6 @@ $_SERVER['argv'][1] = 'BankAccountTest';
$_SERVER['argv'][2] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECT--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/exclude-group.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECT--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/filter-class.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECT--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/filter-method.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECT--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/group.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECT--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/help.phpt
@@ -3,8 +3,6 @@ phpunit
--FILE--
<?php
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECT--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/help2.phpt
@@ -5,8 +5,6 @@ phpunit --help
$_SERVER['argv'][1] = '--help';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECT--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/log-graphviz.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECT--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/log-json.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/log-tap.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/log-xml.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/repeat.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECT--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/skeleton.phpt
@@ -6,8 +6,6 @@ $_SERVER['argv'][1] = 'Calculator';
$_SERVER['argv'][2] = dirname(dirname(__FILE__)) . '/_files/Calculator.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECT--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/tap.phpt
@@ -7,8 +7,6 @@ $_SERVER['argv'][2] = 'BankAccountTest';
$_SERVER['argv'][3] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/testdox-html.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/testdox-text.phpt
@@ -8,8 +8,6 @@ $_SERVER['argv'][3] = 'BankAccountTest';
$_SERVER['argv'][4] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/testdox.phpt
@@ -7,8 +7,6 @@ $_SERVER['argv'][2] = 'BankAccountTest';
$_SERVER['argv'][3] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
PHPUnit @package_version@ by Sebastian Bergmann.
View
2 PHPUnit/Tests/TextUI/verbose.phpt
@@ -7,8 +7,6 @@ $_SERVER['argv'][2] = 'BankAccountTest';
$_SERVER['argv'][3] = '../Samples/BankAccount/BankAccountTest.php';
require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
-
-PHPUnit_TextUI_Command::main();
?>
--EXPECT--
PHPUnit @package_version@ by Sebastian Bergmann.
View
20 PHPUnit/TextUI/Command.php
@@ -73,7 +73,7 @@ class PHPUnit_TextUI_Command
{
/**
*/
- public static function main()
+ public static function main($exit = TRUE)
{
$arguments = self::handleArguments();
$runner = new PHPUnit_TextUI_TestRunner;
@@ -122,16 +122,18 @@ public static function main()
);
}
- if ($result->wasSuccessful()) {
- exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
- }
+ if ($exit) {
+ if ($result->wasSuccessful()) {
+ exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT);
+ }
- else if ($result->errorCount() > 0) {
- exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
- }
+ else if ($result->errorCount() > 0) {
+ exit(PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT);
+ }
- else {
- exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
+ else {
+ exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT);
+ }
}
}

0 comments on commit 2ee1eaa

Please sign in to comment.