function ContainerAwareEventDispatcherTest::testGetListenersWhenAddedCallbackListenerIsRemoved
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php \Drupal\Tests\Component\EventDispatcher\ContainerAwareEventDispatcherTest::testGetListenersWhenAddedCallbackListenerIsRemoved()
- 10 core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php \Drupal\Tests\Component\EventDispatcher\ContainerAwareEventDispatcherTest::testGetListenersWhenAddedCallbackListenerIsRemoved()
- 11.x core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php \Drupal\Tests\Component\EventDispatcher\ContainerAwareEventDispatcherTest::testGetListenersWhenAddedCallbackListenerIsRemoved()
File
-
core/
tests/ Drupal/ Tests/ Component/ EventDispatcher/ ContainerAwareEventDispatcherTest.php, line 499
Class
- ContainerAwareEventDispatcherTest
- Unit tests for the ContainerAwareEventDispatcher.
Namespace
Drupal\Tests\Component\EventDispatcherCode
public function testGetListenersWhenAddedCallbackListenerIsRemoved() {
$listener = function () {
};
$this->dispatcher
->addListener('foo', $listener);
$this->dispatcher
->removeListener('foo', $listener);
$this->assertSame([], $this->dispatcher
->getListeners());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.