Yaffs site version 1.1
[yaffs-website] / vendor / phpunit / phpunit / tests / Framework / BaseTestListenerTest.php
1 <?php
2 /*
3  * This file is part of PHPUnit.
4  *
5  * (c) Sebastian Bergmann <sebastian@phpunit.de>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * @since      Class available since Release 4.0.0
13  */
14 class Framework_BaseTestListenerTest extends PHPUnit_Framework_TestCase
15 {
16     /**
17      * @var PHPUnit_Framework_TestResult
18      */
19     private $result;
20
21     /**
22      * @covers PHPUnit_Framework_TestResult
23      */
24     public function testEndEventsAreCounted()
25     {
26         $this->result = new PHPUnit_Framework_TestResult;
27         $listener     = new BaseTestListenerSample();
28         $this->result->addListener($listener);
29         $test = new Success;
30         $test->run($this->result);
31
32         $this->assertEquals(1, $listener->endCount);
33     }
34 }