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