public function TraceableEventDispatcherTest::testLogger in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php \Symfony\Component\EventDispatcher\Tests\Debug\TraceableEventDispatcherTest::testLogger()
File
- vendor/
symfony/ event-dispatcher/ Tests/ Debug/ TraceableEventDispatcherTest.php, line 104
Class
Namespace
Symfony\Component\EventDispatcher\Tests\DebugCode
public function testLogger() {
$logger = $this
->getMock('Psr\\Log\\LoggerInterface');
$dispatcher = new EventDispatcher();
$tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger);
$tdispatcher
->addListener('foo', $listener1 = function () {
});
$tdispatcher
->addListener('foo', $listener2 = function () {
});
$logger
->expects($this
->at(0))
->method('debug')
->with('Notified event "foo" to listener "closure".');
$logger
->expects($this
->at(1))
->method('debug')
->with('Notified event "foo" to listener "closure".');
$tdispatcher
->dispatch('foo');
}