comparison vendor/symfony/event-dispatcher/Tests/EventTest.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
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 PHPUnit\Framework\TestCase;
15 use Symfony\Component\EventDispatcher\Event;
16
17 /**
18 * Test class for Event.
19 */
20 class EventTest extends TestCase
21 {
22 /**
23 * @var \Symfony\Component\EventDispatcher\Event
24 */
25 protected $event;
26
27 /**
28 * Sets up the fixture, for example, opens a network connection.
29 * This method is called before a test is executed.
30 */
31 protected function setUp()
32 {
33 $this->event = new Event();
34 }
35
36 /**
37 * Tears down the fixture, for example, closes a network connection.
38 * This method is called after a test is executed.
39 */
40 protected function tearDown()
41 {
42 $this->event = null;
43 }
44
45 public function testIsPropagationStopped()
46 {
47 $this->assertFalse($this->event->isPropagationStopped());
48 }
49
50 public function testStopPropagationAndIsPropagationStopped()
51 {
52 $this->event->stopPropagation();
53 $this->assertTrue($this->event->isPropagationStopped());
54 }
55 }