Overview

Namespaces

  • Composer
    • Autoload
  • Guzzle
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Mock
    • Stream
  • Mockery
    • Adapter
      • Phpunit
    • CountValidator
    • Exception
    • Generator
      • StringManipulation
        • Pass
    • Loader
    • Matcher
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP
  • Symfony
    • Component
      • EventDispatcher
        • Debug
        • DependencyInjection
        • Tests
          • Debug
          • DependencyInjection
      • HttpFoundation
        • File
          • Exception
          • MimeType
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
        • Tests
          • File
            • MimeType
          • Session
            • Attribute
            • Flash
            • Storage
              • Handler
              • Proxy
      • Yaml
        • Exception
        • Tests

Classes

  • Symfony\Component\Yaml\Tests\A
  • Symfony\Component\Yaml\Tests\B
  • Symfony\Component\Yaml\Tests\DumperTest
  • Symfony\Component\Yaml\Tests\InlineTest
  • Symfony\Component\Yaml\Tests\ParseExceptionTest
  • Symfony\Component\Yaml\Tests\ParserTest
  • Symfony\Component\Yaml\Tests\YamlTest
  • Overview
  • Namespace
  • Function
  • Tree
 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->dispatcher = 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 testLegacySetDispatcher()
64:     {
65:         $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
66:         $this->event->setDispatcher($this->dispatcher);
67:         $this->assertSame($this->dispatcher, $this->event->getDispatcher());
68:     }
69: 
70:     public function testLegacyGetDispatcher()
71:     {
72:         $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
73:         $this->assertNull($this->event->getDispatcher());
74:     }
75: 
76:     public function testLegacyGetName()
77:     {
78:         $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
79:         $this->assertNull($this->event->getName());
80:     }
81: 
82:     public function testLegacySetName()
83:     {
84:         $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
85:         $this->event->setName('foo');
86:         $this->assertEquals('foo', $this->event->getName());
87:     }
88: }
89: 
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen