diff vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children 1fec387a4317
line wrap: on
line diff
--- a/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php	Fri Feb 23 15:51:18 2018 +0000
+++ b/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php	Fri Feb 23 15:52:07 2018 +0000
@@ -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;
@@ -105,20 +104,10 @@
         $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 @@
         $this->assertEquals(array(), $tdispatcher->getNotCalledListeners());
     }
 
-    public function isWrappedDataProvider()
-    {
-        return array(
-            array(false),
-            array(true),
-        );
-    }
-
     public function testGetCalledListenersNested()
     {
         $tdispatcher = null;