public function AbstractEventDispatcherTest::testAddSubscriber in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php \Symfony\Component\EventDispatcher\Tests\AbstractEventDispatcherTest::testAddSubscriber()
File
- vendor/
symfony/ event-dispatcher/ Tests/ AbstractEventDispatcherTest.php, line 189
Class
Namespace
Symfony\Component\EventDispatcher\TestsCode
public function testAddSubscriber() {
$eventSubscriber = new TestEventSubscriber();
$this->dispatcher
->addSubscriber($eventSubscriber);
$this
->assertTrue($this->dispatcher
->hasListeners(self::preFoo));
$this
->assertTrue($this->dispatcher
->hasListeners(self::postFoo));
}