public function ContainerAwareTraceableEventDispatcherTest::testStaticCallable

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/ContainerAwareTraceableEventDispatcherTest.php, line 59

Class

ContainerAwareTraceableEventDispatcherTest

Namespace

Symfony\Component\HttpKernel\Tests\Debug

Code

public function testStaticCallable() {
  $container = $this
    ->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
  $dispatcher = new ContainerAwareTraceableEventDispatcher($container, new StopWatch());
  $dispatcher
    ->addListener('onFooEvent', array(
    __NAMESPACE__ . '\\StaticClassFixture',
    'staticListener',
  ));
  $dispatcher
    ->dispatch('onFooEvent');
  $this
    ->assertTrue(StaticClassFixture::$called);
}