diff options
author | Bharat Mediratta <bharat@menalto.com> | 2013-03-06 16:38:38 -0500 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2013-03-06 16:38:38 -0500 |
commit | feed100337e2222c4656901d11c2f80a0e667002 (patch) | |
tree | 2973a28ad68c2371426c1c41974d759e0dbf0561 /modules/unit_test | |
parent | d136a035e38e920f294aa71acce23a28fc6f5796 (diff) |
Revert "Return "1" to CLI if not all unit tests pass.". We're not successfully
passing back $all_passed because the function doesn't take it by reference. Which
is my fault because I gave Jozefs bad advice. But I don't think it's necessary anyway
so I'm going to try a different approach.
This reverts commit 4fe07c6b0a341b0b99ee1b051f7c0bdfda572e04.
Conflicts:
modules/gallery_unit_test/controllers/gallery_unit_test.php
Diffstat (limited to 'modules/unit_test')
-rw-r--r-- | modules/unit_test/libraries/Unit_Test.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/unit_test/libraries/Unit_Test.php b/modules/unit_test/libraries/Unit_Test.php index 15306f7e..253d6fb6 100644 --- a/modules/unit_test/libraries/Unit_Test.php +++ b/modules/unit_test/libraries/Unit_Test.php @@ -67,10 +67,9 @@ class Unit_Test_Core { * * @param array test path(s) * @param string filter (regular expression) - * @param boolean will be set to true if all tests pass * @return void */ - public function __construct($extra_paths=array(), $filter=null, $all_passed=null) + public function __construct($extra_paths=array(), $filter=null) { // Merge possible default test path(s) from config with the rest $paths = array_merge($extra_paths, Kohana::config('unit_test.paths', FALSE, FALSE)); @@ -84,9 +83,6 @@ class Unit_Test_Core { // Take out duplicate test paths after normalization $this->paths = array_unique($paths); - // Assume all tests will pass - $all_passed = true; - // Loop over each given test path foreach ($this->paths as $path) { @@ -220,7 +216,6 @@ class Unit_Test_Core { // Test failed $this->results[$class][$method_name] = $e; $this->stats[$class]['failed']++; - $all_passed = false; } catch (Exception $e) { @@ -229,7 +224,6 @@ class Unit_Test_Core { // Test error $this->results[$class][$method_name] = $e; $this->stats[$class]['errors']++; - $all_passed = false; } // Calculate score |