You are here

public function TraceableEventDispatcherTest::testGetListeners in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php \Symfony\Component\EventDispatcher\Tests\Debug\TraceableEventDispatcherTest::testGetListeners()

File

vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php, line 37

Class

TraceableEventDispatcherTest

Namespace

Symfony\Component\EventDispatcher\Tests\Debug

Code

public function testGetListeners() {
  $dispatcher = new EventDispatcher();
  $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch());
  $tdispatcher
    ->addListener('foo', $listener = function () {
  });
  $this
    ->assertSame($dispatcher
    ->getListeners('foo'), $tdispatcher
    ->getListeners('foo'));
}