You are here

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

File

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

Class

AbstractEventDispatcherTest

Namespace

Symfony\Component\EventDispatcher\Tests

Code

public function testHasListenersWhenAddedCallbackListenerIsRemoved() {
  $listener = function () {
  };
  $this->dispatcher
    ->addListener('foo', $listener);
  $this->dispatcher
    ->removeListener('foo', $listener);
  $this
    ->assertFalse($this->dispatcher
    ->hasListeners());
}