You are here

public function AbstractEventDispatcherTest::testGetListenersWhenAddedCallbackListenerIsRemoved 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::testGetListenersWhenAddedCallbackListenerIsRemoved()

File

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

Class

AbstractEventDispatcherTest

Namespace

Symfony\Component\EventDispatcher\Tests

Code

public function testGetListenersWhenAddedCallbackListenerIsRemoved() {
  $listener = function () {
  };
  $this->dispatcher
    ->addListener('foo', $listener);
  $this->dispatcher
    ->removeListener('foo', $listener);
  $this
    ->assertSame(array(), $this->dispatcher
    ->getListeners());
}