[EventDispatcher] fix merge of #22541 from 2.8
This commit is contained in:
parent
85959c2abb
commit
f67eba863c
@ -13,7 +13,6 @@ namespace Symfony\Component\EventDispatcher\Tests\Debug;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher;
|
||||
use Symfony\Component\EventDispatcher\Debug\WrappedListener;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
@ -105,20 +104,10 @@ class TraceableEventDispatcherTest extends TestCase
|
||||
$this->assertCount(0, $dispatcher->getListeners('foo'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider isWrappedDataProvider
|
||||
*
|
||||
* @param bool $isWrapped
|
||||
*/
|
||||
public function testGetCalledListeners($isWrapped)
|
||||
public function testGetCalledListeners()
|
||||
{
|
||||
$dispatcher = new EventDispatcher();
|
||||
$stopWatch = new Stopwatch();
|
||||
$tdispatcher = new TraceableEventDispatcher($dispatcher, $stopWatch);
|
||||
|
||||
$listener = function () {};
|
||||
|
||||
$tdispatcher->addListener('foo', $listener, 5);
|
||||
$tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch());
|
||||
$tdispatcher->addListener('foo', function () {}, 5);
|
||||
|
||||
$listeners = $tdispatcher->getNotCalledListeners();
|
||||
$this->assertArrayHasKey('data', $listeners['foo.closure']);
|
||||
@ -134,14 +123,6 @@ class TraceableEventDispatcherTest extends TestCase
|
||||
$this->assertEquals(array(), $tdispatcher->getNotCalledListeners());
|
||||
}
|
||||
|
||||
public function isWrappedDataProvider()
|
||||
{
|
||||
return array(
|
||||
array(false),
|
||||
array(true),
|
||||
);
|
||||
}
|
||||
|
||||
public function testGetCalledListenersNested()
|
||||
{
|
||||
$tdispatcher = null;
|
||||
|
Reference in New Issue
Block a user