Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / http-kernel / Tests / DataCollector / ExceptionDataCollectorTest.php
index afad9f58af63836229127fef862a9696fdfc664f..178f1f01a3fc07fdf6d7c92c302e174e561e33a7 100644 (file)
@@ -37,4 +37,23 @@ class ExceptionDataCollectorTest extends TestCase
         $this->assertSame('exception', $c->getName());
         $this->assertSame($trace, $c->getTrace());
     }
+
+    public function testCollectWithoutException()
+    {
+        $c = new ExceptionDataCollector();
+        $c->collect(new Request(), new Response());
+
+        $this->assertFalse($c->hasException());
+    }
+
+    public function testReset()
+    {
+        $c = new ExceptionDataCollector();
+
+        $c->collect(new Request(), new Response(), new \Exception());
+        $c->reset();
+        $c->collect(new Request(), new Response());
+
+        $this->assertFalse($c->hasException());
+    }
 }