Expanded class hierarchy of EventDataCollectorTest
class EventDataCollectorTest extends \PHPUnit_Framework_TestCase {
protected function setUp() {
if (!class_exists('Symfony\\Component\\EventDispatcher\\EventDispatcher')) {
$this
->markTestSkipped('The "EventDispatcher" component is not available');
}
if (!class_exists('Symfony\\Component\\HttpFoundation\\Request')) {
$this
->markTestSkipped('The "HttpFoundation" component is not available');
}
}
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());
}
}
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EventDataCollectorTest:: |
protected | function | ||
EventDataCollectorTest:: |
public | function |