Skip to content

Commit

Permalink
- Merge [4978].
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jul 12, 2009
1 parent 785fa90 commit 3b741a0
Show file tree
Hide file tree
Showing 28 changed files with 20 additions and 41 deletions.
16 changes: 2 additions & 14 deletions PHPUnit/Framework/TestResult.php
Expand Up @@ -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
);
Expand All @@ -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);
Expand Down
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-class-extended.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-class-isolation.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-class.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-method-isolation.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-method.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-not-private.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-not-protected.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-not-public.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-private.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-protected.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-public-isolation.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
2 changes: 1 addition & 1 deletion PHPUnit/Tests/TextUI/coverage-clover-public.phpt
Expand Up @@ -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.<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="%i" phpunit="%s">
Expand Down
1 change: 0 additions & 1 deletion PHPUnit/Tests/_files/CoverageClassExtendedTest.php
Expand Up @@ -10,6 +10,5 @@ public function testPublicMethod()
{
$o = new CoveredClass;
$o->publicMethod();
$this->assertTrue(TRUE);
}
}
1 change: 0 additions & 1 deletion PHPUnit/Tests/_files/CoverageClassTest.php
Expand Up @@ -10,6 +10,5 @@ public function testPublicMethod()
{
$o = new CoveredClass;
$o->publicMethod();
$this->assertTrue(TRUE);
}
}
1 change: 0 additions & 1 deletion PHPUnit/Tests/_files/CoverageMethodTest.php
Expand Up @@ -10,6 +10,5 @@ public function testPublicMethod()
{
$o = new CoveredClass;
$o->publicMethod();
$this->assertTrue(TRUE);
}
}
1 change: 0 additions & 1 deletion PHPUnit/Tests/_files/CoverageNotPrivateTest.php
Expand Up @@ -10,6 +10,5 @@ public function testPublicMethod()
{
$o = new CoveredClass;
$o->publicMethod();
$this->assertTrue(TRUE);
}
}
1 change: 0 additions & 1 deletion PHPUnit/Tests/_files/CoverageNotProtectedTest.php
Expand Up @@ -10,6 +10,5 @@ public function testPublicMethod()
{
$o = new CoveredClass;
$o->publicMethod();
$this->assertTrue(TRUE);
}
}
1 change: 0 additions & 1 deletion PHPUnit/Tests/_files/CoverageNotPublicTest.php
Expand Up @@ -10,6 +10,5 @@ public function testPublicMethod()
{
$o = new CoveredClass;
$o->publicMethod();
$this->assertTrue(TRUE);
}
}
1 change: 0 additions & 1 deletion PHPUnit/Tests/_files/CoveragePrivateTest.php
Expand Up @@ -10,6 +10,5 @@ public function testPublicMethod()
{
$o = new CoveredClass;
$o->publicMethod();
$this->assertTrue(TRUE);
}
}
1 change: 0 additions & 1 deletion PHPUnit/Tests/_files/CoverageProtectedTest.php
Expand Up @@ -10,6 +10,5 @@ public function testPublicMethod()
{
$o = new CoveredClass;
$o->publicMethod();
$this->assertTrue(TRUE);
}
}
1 change: 0 additions & 1 deletion PHPUnit/Tests/_files/CoveragePublicTest.php
Expand Up @@ -10,6 +10,5 @@ public function testPublicMethod()
{
$o = new CoveredClass;
$o->publicMethod();
$this->assertTrue(TRUE);
}
}

0 comments on commit 3b741a0

Please sign in to comment.