diff --git a/PHPUnit/Framework/TestResult.php b/PHPUnit/Framework/TestResult.php index dab166f3cc5..b6a88a29342 100644 --- a/PHPUnit/Framework/TestResult.php +++ b/PHPUnit/Framework/TestResult.php @@ -674,24 +674,12 @@ public function run(PHPUnit_Framework_Test $test) $error = TRUE; } - $time = PHPUnit_Util_Timer::stop(); - $numAssertions = PHPUnit_Framework_Assert::getCount(); + $time = PHPUnit_Util_Timer::stop(); if ($useXdebug) { $codeCoverage = xdebug_get_code_coverage(); xdebug_stop_code_coverage(); - // Disregard code coverage information when nothing was asserted. - if ($numAssertions == 0) { - foreach ($codeCoverage as &$data) { - foreach ($data as &$status) { - if ($status > 0) { - $status = -1; - } - } - } - } - $this->appendCodeCoverageInformation( $test, $codeCoverage ); @@ -701,7 +689,7 @@ public function run(PHPUnit_Framework_Test $test) restore_error_handler(); } - $test->addToAssertionCount($numAssertions); + $test->addToAssertionCount(PHPUnit_Framework_Assert::getCount()); if ($error === TRUE) { $this->addError($test, $e, $time); diff --git a/PHPUnit/Tests/TextUI/coverage-clover-class-extended-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-class-extended-isolation.phpt index 2555bf3ca3d..e5d0a6e51ef 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-class-extended-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-class-extended-isolation.phpt @@ -19,7 +19,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-class-extended.phpt b/PHPUnit/Tests/TextUI/coverage-clover-class-extended.phpt index 7c4200098ce..fafad037b6a 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-class-extended.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-class-extended.phpt @@ -18,7 +18,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-class-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-class-isolation.phpt index 8685fccbc5a..06fdaf9a321 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-class-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-class-isolation.phpt @@ -19,7 +19,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-class.phpt b/PHPUnit/Tests/TextUI/coverage-clover-class.phpt index 3559eeb9165..bfaf71e8ecc 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-class.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-class.phpt @@ -18,7 +18,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-method-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-method-isolation.phpt index 7a1a3287738..86447ea5f4d 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-method-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-method-isolation.phpt @@ -19,7 +19,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-method.phpt b/PHPUnit/Tests/TextUI/coverage-clover-method.phpt index 2c3654b12c5..1fa75d4e6e8 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-method.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-method.phpt @@ -18,7 +18,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-private-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-private-isolation.phpt index f263b92e5ba..a0f1691aa3c 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-private-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-private-isolation.phpt @@ -19,7 +19,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-private.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-private.phpt index 4231a749cbe..6fd31529c7e 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-private.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-private.phpt @@ -18,7 +18,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-protected-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-protected-isolation.phpt index 3bd010ad2c3..8fe5c329f32 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-protected-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-protected-isolation.phpt @@ -19,7 +19,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-protected.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-protected.phpt index 3483b40fd73..c73f90815c0 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-protected.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-protected.phpt @@ -18,7 +18,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-public-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-public-isolation.phpt index 6b6384c19cc..7ba7cfc960b 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-public-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-public-isolation.phpt @@ -19,7 +19,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-not-public.phpt b/PHPUnit/Tests/TextUI/coverage-clover-not-public.phpt index de9c494c25d..d3cec40fe2c 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-not-public.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-not-public.phpt @@ -18,7 +18,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-private-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-private-isolation.phpt index f962a06cc1e..e36e6c0d0f6 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-private-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-private-isolation.phpt @@ -19,7 +19,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-private.phpt b/PHPUnit/Tests/TextUI/coverage-clover-private.phpt index 46a15f64353..f6b5772946a 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-private.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-private.phpt @@ -18,7 +18,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-protected-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-protected-isolation.phpt index 8314d377e92..6f29bd8cc2f 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-protected-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-protected-isolation.phpt @@ -19,7 +19,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-protected.phpt b/PHPUnit/Tests/TextUI/coverage-clover-protected.phpt index 0a449402817..a76b545321d 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-protected.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-protected.phpt @@ -18,7 +18,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-public-isolation.phpt b/PHPUnit/Tests/TextUI/coverage-clover-public-isolation.phpt index 5ef7b98ed44..e327c8c3004 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-public-isolation.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-public-isolation.phpt @@ -19,7 +19,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/TextUI/coverage-clover-public.phpt b/PHPUnit/Tests/TextUI/coverage-clover-public.phpt index 9832e9bdd51..373fa57b5db 100644 --- a/PHPUnit/Tests/TextUI/coverage-clover-public.phpt +++ b/PHPUnit/Tests/TextUI/coverage-clover-public.phpt @@ -18,7 +18,7 @@ PHPUnit %s by Sebastian Bergmann. Time: %i seconds -OK (1 test, 1 assertion) +OK (1 test, 0 assertions) Writing code coverage data to XML file, this may take a moment. diff --git a/PHPUnit/Tests/_files/CoverageClassExtendedTest.php b/PHPUnit/Tests/_files/CoverageClassExtendedTest.php index c4da4daf82f..40769999624 100644 --- a/PHPUnit/Tests/_files/CoverageClassExtendedTest.php +++ b/PHPUnit/Tests/_files/CoverageClassExtendedTest.php @@ -10,6 +10,5 @@ public function testPublicMethod() { $o = new CoveredClass; $o->publicMethod(); - $this->assertTrue(TRUE); } } diff --git a/PHPUnit/Tests/_files/CoverageClassTest.php b/PHPUnit/Tests/_files/CoverageClassTest.php index 40dd7a8250a..06d78d2e8f0 100644 --- a/PHPUnit/Tests/_files/CoverageClassTest.php +++ b/PHPUnit/Tests/_files/CoverageClassTest.php @@ -10,6 +10,5 @@ public function testPublicMethod() { $o = new CoveredClass; $o->publicMethod(); - $this->assertTrue(TRUE); } } diff --git a/PHPUnit/Tests/_files/CoverageMethodTest.php b/PHPUnit/Tests/_files/CoverageMethodTest.php index ad4320ef264..4489919f11d 100644 --- a/PHPUnit/Tests/_files/CoverageMethodTest.php +++ b/PHPUnit/Tests/_files/CoverageMethodTest.php @@ -10,6 +10,5 @@ public function testPublicMethod() { $o = new CoveredClass; $o->publicMethod(); - $this->assertTrue(TRUE); } } diff --git a/PHPUnit/Tests/_files/CoverageNotPrivateTest.php b/PHPUnit/Tests/_files/CoverageNotPrivateTest.php index f52917a92a8..11bb523e849 100644 --- a/PHPUnit/Tests/_files/CoverageNotPrivateTest.php +++ b/PHPUnit/Tests/_files/CoverageNotPrivateTest.php @@ -10,6 +10,5 @@ public function testPublicMethod() { $o = new CoveredClass; $o->publicMethod(); - $this->assertTrue(TRUE); } } diff --git a/PHPUnit/Tests/_files/CoverageNotProtectedTest.php b/PHPUnit/Tests/_files/CoverageNotProtectedTest.php index 2fde71158a8..14d9a421c3d 100644 --- a/PHPUnit/Tests/_files/CoverageNotProtectedTest.php +++ b/PHPUnit/Tests/_files/CoverageNotProtectedTest.php @@ -10,6 +10,5 @@ public function testPublicMethod() { $o = new CoveredClass; $o->publicMethod(); - $this->assertTrue(TRUE); } } diff --git a/PHPUnit/Tests/_files/CoverageNotPublicTest.php b/PHPUnit/Tests/_files/CoverageNotPublicTest.php index 061c271a03e..3724007f711 100644 --- a/PHPUnit/Tests/_files/CoverageNotPublicTest.php +++ b/PHPUnit/Tests/_files/CoverageNotPublicTest.php @@ -10,6 +10,5 @@ public function testPublicMethod() { $o = new CoveredClass; $o->publicMethod(); - $this->assertTrue(TRUE); } } diff --git a/PHPUnit/Tests/_files/CoveragePrivateTest.php b/PHPUnit/Tests/_files/CoveragePrivateTest.php index f96c13d65da..641703ea4b4 100644 --- a/PHPUnit/Tests/_files/CoveragePrivateTest.php +++ b/PHPUnit/Tests/_files/CoveragePrivateTest.php @@ -10,6 +10,5 @@ public function testPublicMethod() { $o = new CoveredClass; $o->publicMethod(); - $this->assertTrue(TRUE); } } diff --git a/PHPUnit/Tests/_files/CoverageProtectedTest.php b/PHPUnit/Tests/_files/CoverageProtectedTest.php index e6cedee0009..821d9ea9635 100644 --- a/PHPUnit/Tests/_files/CoverageProtectedTest.php +++ b/PHPUnit/Tests/_files/CoverageProtectedTest.php @@ -10,6 +10,5 @@ public function testPublicMethod() { $o = new CoveredClass; $o->publicMethod(); - $this->assertTrue(TRUE); } } diff --git a/PHPUnit/Tests/_files/CoveragePublicTest.php b/PHPUnit/Tests/_files/CoveragePublicTest.php index 1cb82f326d1..2a7fff05dd1 100644 --- a/PHPUnit/Tests/_files/CoveragePublicTest.php +++ b/PHPUnit/Tests/_files/CoveragePublicTest.php @@ -10,6 +10,5 @@ public function testPublicMethod() { $o = new CoveredClass; $o->publicMethod(); - $this->assertTrue(TRUE); } }