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: 824dc8ba5f

@fabpot due to different implementations I created 2 PR's:

2.8: https://github.com/symfony/symfony/pull/22541
3.2: https://github.com/symfony/symfony/pull/22568

So the 2.8 merge into 3.2 of my change-set introduced some unused variable `$isWrapped` here: 824dc8ba5f (diff-af3c4fbca8bb77957c00087543ae5a4dR113)

This PR just cleans it up and also removes the data provider 😉

Commits
-------

f67eba8 [EventDispatcher] fix merge of #22541 from 2.8
This commit is contained in:
Nicolas Grekas 2017-05-02 11:20:19 +02:00
commit 0c704cf76a

View File

@ -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;