public function ImmutableEventDispatcherTest::testAddListenerDisallowed

@expectedException \BadMethodCallException

File

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

Class

ImmutableEventDispatcherTest
@author Bernhard Schussek <bschussek@gmail.com>

Namespace

Symfony\Component\EventDispatcher\Tests

Code

public function testAddListenerDisallowed() {
  $this->dispatcher
    ->addListener('event', function () {
    return 'foo';
  });
}