~tcuthbert/wordpress/openstack-objectstorage

« back to all changes in this revision

Viewing changes to vendor/phpunit/phpunit/tests/Framework/BaseTestListenerTest.php

  • Committer: Jacek Nykis
  • Date: 2015-02-11 15:35:31 UTC
  • Revision ID: jacek.nykis@canonical.com-20150211153531-hmy6zi0ov2qfkl0b
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 *
 
13
 *
 
14
 * @package    PHPUnit
 
15
 * @author     Giorgio Sironi <info@giorgiosironi.com>
 
16
 * @copyright  Sebastian Bergmann <sebastian@phpunit.de>
 
17
 * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 3-Clause License
 
18
 * @link       http://www.phpunit.de/
 
19
 * @since      Class available since Release 4.0.0
 
20
 */
 
21
class Framework_BaseTestListenerTest extends PHPUnit_Framework_TestCase
 
22
{
 
23
    /**
 
24
     * @var PHPUnit_Framework_TestResult
 
25
     */
 
26
    private $result;
 
27
 
 
28
    /**
 
29
     * @covers PHPUnit_Framework_TestResult
 
30
     */
 
31
    public function testEndEventsAreCounted()
 
32
    {
 
33
        $this->result = new PHPUnit_Framework_TestResult;
 
34
        $listener = new BaseTestListenerSample();
 
35
        $this->result->addListener($listener);
 
36
        $test = new Success;
 
37
        $test->run($this->result);
 
38
 
 
39
        $this->assertEquals(1, $listener->endCount);
 
40
    }
 
41
}