8000 [EventDispatcher] fix merge of #22541 from 2.8 by dmaicher · Pull Request #22602 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[EventDispatcher] fix merge of #22541 from 2.8 #22602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[EventDispatcher] fix merge of #22541 from 2.8
  • Loading branch information
dmaicher committed May 1, 2017
commit f67eba863c6fb9170fc99aa2b57985be1ff93445
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

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;
Expand Down Expand Up @@ -105,20 +104,10 @@ public function testAddRemoveSubscriber()
$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']);
Expand All @@ -134,14 +123,6 @@ public function testGetCalledListeners($isWrapped)
$this->assertEquals(array(), $tdispatcher->getNotCalledListeners());
}

public function isWrappedDataProvider()
{
return array(
array(false),
array(true),
);
}

public function testGetCalledListenersNested()
{
$tdispatcher = null;
Expand Down
0