public function EventDispatcherTest::testWorkaroundForPhpBug62976

This bug affects:

  • The PHP 5.3 branch for versions < 5.3.18
  • The PHP 5.4 branch for versions < 5.4.8
  • The PHP 5.5 branch is not affected

See also

https://bugs.php.net/bug.php?id=62976

File

drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php, line 256

Class

EventDispatcherTest

Namespace

Symfony\Component\EventDispatcher\Tests

Code

public function testWorkaroundForPhpBug62976() {
  $dispatcher = new EventDispatcher();
  $dispatcher
    ->addListener('bug.62976', new CallableClass());
  $dispatcher
    ->removeListener('bug.62976', function () {
  });
  $this
    ->assertTrue($dispatcher
    ->hasListeners('bug.62976'));
}