public function ContainerAwareEventDispatcherTest::testRemoveSubscriberWithPriorities in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php \Drupal\Tests\Component\EventDispatcher\ContainerAwareEventDispatcherTest::testRemoveSubscriberWithPriorities()
- 10 core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php \Drupal\Tests\Component\EventDispatcher\ContainerAwareEventDispatcherTest::testRemoveSubscriberWithPriorities()
File
- core/
tests/ Drupal/ Tests/ Component/ EventDispatcher/ ContainerAwareEventDispatcherTest.php, line 390
Class
- ContainerAwareEventDispatcherTest
- Unit tests for the ContainerAwareEventDispatcher.
Namespace
Drupal\Tests\Component\EventDispatcherCode
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));
}