public function AbstractEventDispatcherTest::testEventReceivesTheDispatcherInstanceAsArgument in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php \Symfony\Component\EventDispatcher\Tests\AbstractEventDispatcherTest::testEventReceivesTheDispatcherInstanceAsArgument()
File
- vendor/
symfony/ event-dispatcher/ Tests/ AbstractEventDispatcherTest.php, line 265
Class
Namespace
Symfony\Component\EventDispatcher\TestsCode
public function testEventReceivesTheDispatcherInstanceAsArgument() {
$listener = new TestWithDispatcher();
$this->dispatcher
->addListener('test', array(
$listener,
'foo',
));
$this
->assertNull($listener->name);
$this
->assertNull($listener->dispatcher);
$this->dispatcher
->dispatch('test');
$this
->assertEquals('test', $listener->name);
$this
->assertSame($this->dispatcher, $listener->dispatcher);
}