You are here

public function AbstractEventDispatcherTest::testRemoveSubscriberWithPriorities in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php \Symfony\Component\EventDispatcher\Tests\AbstractEventDispatcherTest::testRemoveSubscriberWithPriorities()

File

vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php, line 233

Class

AbstractEventDispatcherTest

Namespace

Symfony\Component\EventDispatcher\Tests

Code

public function testRemoveSubscriberWithPriorities() {
  $eventSubscriber = new TestEventSubscriberWithPriorities();
  $this->dispatcher
    ->addSubscriber($eventSubscriber);
  $this
    ->assertTrue($this->dispatcher
    ->hasListeners(self::preFoo));
  $this->dispatcher
    ->removeSubscriber($eventSubscriber);
  $this
    ->assertFalse($this->dispatcher
    ->hasListeners(self::preFoo));
}