Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / debug / Tests / ErrorHandlerTest.php
index 03dd8074121a7e93aeb1a883a19ad318be885f5c..02e9a7589c284f25467dddc6110f3cbb27c3d352 100644 (file)
@@ -545,4 +545,18 @@ class ErrorHandlerTest extends TestCase
             restore_exception_handler();
         }
     }
+
+    /**
+     * @expectedException \Exception
+     * @group no-hhvm
+     */
+    public function testCustomExceptionHandler()
+    {
+        $handler = new ErrorHandler();
+        $handler->setExceptionHandler(function ($e) use ($handler) {
+            $handler->handleException($e);
+        });
+
+        $handler->handleException(new \Exception());
+    }
 }