public function EventDataCollectorTest::testCollect

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/EventDataCollectorTest.php, line 33

Class

EventDataCollectorTest

Namespace

Symfony\Component\HttpKernel\Tests\DataCollector

Code

public function testCollect() {
  $c = new EventDataCollector();
  $c
    ->setEventDispatcher(new TestEventDispatcher());
  $c
    ->collect(new Request(), new Response());
  $this
    ->assertSame('events', $c
    ->getName());
  $this
    ->assertSame(array(
    'foo',
  ), $c
    ->getCalledListeners());
  $this
    ->assertSame(array(
    'bar',
  ), $c
    ->getNotCalledListeners());
}