From 3a31b59473102af10bb3a8fd44de0b6ed5426e63 Mon Sep 17 00:00:00 2001 From: Andrea Turso Date: Wed, 16 May 2012 16:55:24 +0100 Subject: [PATCH] Minor changes to the EventDispatcherTest - Removed Exception class import - Added FQN at L60 - Added documentation - Added @group event-dispatcher --- tests/Composer/Test/Script/EventDispatcherTest.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/Composer/Test/Script/EventDispatcherTest.php b/tests/Composer/Test/Script/EventDispatcherTest.php index b49e05fe1..724eb182d 100644 --- a/tests/Composer/Test/Script/EventDispatcherTest.php +++ b/tests/Composer/Test/Script/EventDispatcherTest.php @@ -11,20 +11,24 @@ namespace Composer\Test\Script; -use Exception; use Composer\Test\TestCase; use Composer\Script\Event; use Composer\Script\EventDispatcher; /** + * Event Dispatcher Test Case * - * @group + * @group event-dispatcher * @ticket #693 * @author Andrea Turso */ class EventDispatcherTest extends TestCase { /** + * Test the doDispatch method properly catches any exception + * thrown from the listener invocation, i.e., $className::$methodName($event), + * and replaces it with a \RuntimeException. + * * @expectedException \RuntimeException */ public function testListenerExceptionsAreSuppressed() @@ -53,6 +57,6 @@ class EventDispatcherTest extends TestCase public static function call() { - throw new Exception(); + throw new \Exception(); } } \ No newline at end of file