diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-03 19:26:54 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-03 19:26:54 +0200 |
commit | 4f5b44bd3bd490309eb2ba7b44df4769816ba729 (patch) | |
tree | 6cefe170dfe0a5a361cb1e2d1fc4d580a3316d02 /vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php | |
parent | 2b840e0cfb63a453bea67a98541f3df9c273c5f5 (diff) | |
download | wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.tar.gz wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.tar.zst wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.zip |
twig implementation
Diffstat (limited to 'vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php')
-rw-r--r-- | vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php new file mode 100644 index 00000000..52aa9ad6 --- /dev/null +++ b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php | |||
@@ -0,0 +1,84 @@ | |||
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 | use Symfony\Component\EventDispatcher\EventDispatcher; | ||
16 | |||
17 | /** | ||
18 | * Test class for Event. | ||
19 | */ | ||
20 | class EventTest extends \PHPUnit_Framework_TestCase | ||
21 | { | ||
22 | /** | ||
23 | * @var \Symfony\Component\EventDispatcher\Event | ||
24 | */ | ||
25 | protected $event; | ||
26 | |||
27 | /** | ||
28 | * @var \Symfony\Component\EventDispatcher\EventDispatcher | ||
29 | */ | ||
30 | protected $dispatcher; | ||
31 | |||
32 | /** | ||
33 | * Sets up the fixture, for example, opens a network connection. | ||
34 | * This method is called before a test is executed. | ||
35 | */ | ||
36 | protected function setUp() | ||
37 | { | ||
38 | $this->event = new Event; | ||
39 | $this->dispatcher = new EventDispatcher(); | ||
40 | } | ||
41 | |||
42 | /** | ||
43 | * Tears down the fixture, for example, closes a network connection. | ||
44 | * This method is called after a test is executed. | ||
45 | */ | ||
46 | protected function tearDown() | ||
47 | { | ||
48 | $this->event = null; | ||
49 | $this->eventDispatcher = null; | ||
50 | } | ||
51 | |||
52 | public function testIsPropagationStopped() | ||
53 | { | ||
54 | $this->assertFalse($this->event->isPropagationStopped()); | ||
55 | } | ||
56 | |||
57 | public function testStopPropagationAndIsPropagationStopped() | ||
58 | { | ||
59 | $this->event->stopPropagation(); | ||
60 | $this->assertTrue($this->event->isPropagationStopped()); | ||
61 | } | ||
62 | |||
63 | public function testSetDispatcher() | ||
64 | { | ||
65 | $this->event->setDispatcher($this->dispatcher); | ||
66 | $this->assertSame($this->dispatcher, $this->event->getDispatcher()); | ||
67 | } | ||
68 | |||
69 | public function testGetDispatcher() | ||
70 | { | ||
71 | $this->assertNull($this->event->getDispatcher()); | ||
72 | } | ||
73 | |||
74 | public function testGetName() | ||
75 | { | ||
76 | $this->assertNull($this->event->getName()); | ||
77 | } | ||
78 | |||
79 | public function testSetName() | ||
80 | { | ||
81 | $this->event->setName('foo'); | ||
82 | $this->assertEquals('foo', $this->event->getName()); | ||
83 | } | ||
84 | } | ||