Subversion Repositories php-qbpwcf

Rev

Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 liveuser 1
<?php
2
 
3
/*
4
 * This file is part of the Symfony package.
5
 *
6
 * (c) Fabien Potencier <fabien@symfony.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
 
12
namespace Symfony\Component\EventDispatcher\Tests;
13
 
14
use Symfony\Component\EventDispatcher\Event;
15
 
16
/**
17
 * Test class for Event.
18
 */
19
class EventTest extends \PHPUnit_Framework_TestCase
20
{
21
    /**
22
     * @var \Symfony\Component\EventDispatcher\Event
23
     */
24
    protected $event;
25
 
26
    /**
27
     * Sets up the fixture, for example, opens a network connection.
28
     * This method is called before a test is executed.
29
     */
30
    protected function setUp()
31
    {
32
        $this->event = new Event();
33
    }
34
 
35
    /**
36
     * Tears down the fixture, for example, closes a network connection.
37
     * This method is called after a test is executed.
38
     */
39
    protected function tearDown()
40
    {
41
        $this->event = null;
42
    }
43
 
44
    public function testIsPropagationStopped()
45
    {
46
        $this->assertFalse($this->event->isPropagationStopped());
47
    }
48
 
49
    public function testStopPropagationAndIsPropagationStopped()
50
    {
51
        $this->event->stopPropagation();
52
        $this->assertTrue($this->event->isPropagationStopped());
53
    }
54
}