Permalink
Browse files

Changelog and cleanup from #838.

  • Loading branch information...
1 parent a36f92f commit e3703073653f79aab9c6608ffd21eccf4db2c7b5 @whatthejeff whatthejeff committed Mar 10, 2013
Showing with 15 additions and 11 deletions.
  1. +1 −0 ChangeLog.md
  2. +2 −11 Tests/Framework/BaseTestListenerTest.php
  3. +11 −0 Tests/_files/BaseTestListenerSample.php
  4. +1 −0 package.xml
View
@@ -6,6 +6,7 @@ This is the list of changes for the PHPUnit 3.8 release series.
PHPUnit 3.8.0
-------------
+* Implemented #838: Added a base test listener.
* Implemented #835: Printers that extend `PHPUnit_TextUI_ResultPrinter` should have similar construction
* Implemented #834: Added the `@requires OS` annotation.
* Implemented #773: Recursive and repeated arrays are more gracefully when comparison differences are exported.
@@ -43,6 +43,7 @@
*/
require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'Success.php';
+require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'BaseTestListenerSample.php';
/**
*
@@ -59,21 +60,11 @@ class Framework_BaseTestListenerTest extends PHPUnit_Framework_TestCase
public function testEndEventsAreCounted()
{
$this->result = new PHPUnit_Framework_TestResult;
- $listener = new Tests_Framework_BaseTestListenerSample();
+ $listener = new BaseTestListenerSample();
$this->result->addListener($listener);
$test = new Success;
$test->run($this->result);
$this->assertEquals(1, $listener->endCount);
}
}
-
-class Tests_Framework_BaseTestListenerSample extends PHPUnit_Framework_BaseTestListener
-{
- public $endCount = 0;
-
- public function endTest(PHPUnit_Framework_Test $test, $time)
- {
- $this->endCount++;
- }
-}
@@ -0,0 +1,11 @@
+<?php
+
+class BaseTestListenerSample extends PHPUnit_Framework_BaseTestListener
+{
+ public $endCount = 0;
+
+ public function endTest(PHPUnit_Framework_Test $test, $time)
+ {
+ $this->endCount++;
+ }
+}
View
@@ -113,6 +113,7 @@
</dir>
<file baseinstalldir="/" name="AssertionFailedError.php" role="php" />
<file baseinstalldir="/" name="Assert.php" role="php" />
+ <file baseinstalldir="/" name="BaseTestListener.php" role="php" />
<file baseinstalldir="/" name="ComparatorFactory.php" role="php" />
<file baseinstalldir="/" name="Comparator.php" role="php" />
<file baseinstalldir="/" name="ComparisonFailure.php" role="php" />

0 comments on commit e370307

Please sign in to comment.