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 11class Framework_BaseTestListenerTest extends PHPUnit_Framework_TestCase 12{ 13 /** 14 * @var PHPUnit_Framework_TestResult 15 */ 16 private $result; 17 18 public function testEndEventsAreCounted() 19 { 20 $this->result = new PHPUnit_Framework_TestResult; 21 $listener = new BaseTestListenerSample(); 22 $this->result->addListener($listener); 23 $test = new Success; 24 $test->run($this->result); 25 26 $this->assertEquals(1, $listener->endCount); 27 } 28} 29