Skip to content

Commit 0c704cf

Browse files
minor #22602 [EventDispatcher] fix merge of #22541 from 2.8 (dmaicher)
This PR was merged into the 3.2 branch. Discussion ---------- [EventDispatcher] fix merge of #22541 from 2.8 | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This cleans up a test case that was merged from 2.8 into 3.2 here: 824dc8b @fabpot due to different implementations I created 2 PR's: 2.8: #22541 3.2: #22568 So the 2.8 merge into 3.2 of my change-set introduced some unused variable `$isWrapped` here: 824dc8b#diff-af3c4fbca8bb77957c00087543ae5a4dR113 This PR just cleans it up and also removes the data provider 😉 Commits ------- f67eba8 [EventDispatcher] fix merge of #22541 from 2.8
2 parents 8342cd7 + f67eba8 commit 0c704cf

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher;
16-
use Symfony\Component\EventDispatcher\Debug\WrappedListener;
1716
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
1817
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
1918
use Symfony\Component\EventDispatcher\EventDispatcher;
@@ -105,20 +104,10 @@ public function testAddRemoveSubscriber()
105104
$this->assertCount(0, $dispatcher->getListeners('foo'));
106105
}
107106

108-
/**
109-
* @dataProvider isWrappedDataProvider
110-
*
111-
* @param bool $isWrapped
112-
*/
113-
public function testGetCalledListeners($isWrapped)
107+
public function testGetCalledListeners()
114108
{
115-
$dispatcher = new EventDispatcher();
116-
$stopWatch = new Stopwatch();
117-
$tdispatcher = new TraceableEventDispatcher($dispatcher, $stopWatch);
118-
119-
$listener = function () {};
120-
121-
$tdispatcher->addListener('foo', $listener, 5);
109+
$tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch());
110+
$tdispatcher->addListener('foo', function () {}, 5);
122111

123112
$listeners = $tdispatcher->getNotCalledListeners();
124113
$this->assertArrayHasKey('data', $listeners['foo.closure']);
@@ -134,14 +123,6 @@ public function testGetCalledListeners($isWrapped)
134123
$this->assertEquals(array(), $tdispatcher->getNotCalledListeners());
135124
}
136125

137-
public function isWrappedDataProvider()
138-
{
139-
return array(
140-
array(false),
141-
array(true),
142-
);
143-
}
144-
145126
public function testGetCalledListenersNested()
146127
{
147128
$tdispatcher = null;

0 commit comments

Comments
 (0)