You are here

public function AbstractEventDispatcherTest::testLegacyEventReceivesTheDispatcherInstance in Zircon Profile 8

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

@group legacy

File

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

Class

AbstractEventDispatcherTest

Namespace

Symfony\Component\EventDispatcher\Tests

Code

public function testLegacyEventReceivesTheDispatcherInstance() {
  $dispatcher = null;
  $this->dispatcher
    ->addListener('test', function ($event) use (&$dispatcher) {
    $dispatcher = $event
      ->getDispatcher();
  });
  $this->dispatcher
    ->dispatch('test');
  $this
    ->assertSame($this->dispatcher, $dispatcher);
}