Minor changes to the EventDispatcherTest
- Removed Exception class import - Added FQN at L60 - Added documentation - Added @group event-dispatcherpull/699/head
parent
f8b2f203a1
commit
3a31b59473
|
@ -11,20 +11,24 @@
|
||||||
|
|
||||||
namespace Composer\Test\Script;
|
namespace Composer\Test\Script;
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use Composer\Test\TestCase;
|
use Composer\Test\TestCase;
|
||||||
use Composer\Script\Event;
|
use Composer\Script\Event;
|
||||||
use Composer\Script\EventDispatcher;
|
use Composer\Script\EventDispatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Event Dispatcher Test Case
|
||||||
*
|
*
|
||||||
* @group
|
* @group event-dispatcher
|
||||||
* @ticket #693
|
* @ticket #693
|
||||||
* @author Andrea Turso <turso@officinesoftware.co.uk>
|
* @author Andrea Turso <turso@officinesoftware.co.uk>
|
||||||
*/
|
*/
|
||||||
class EventDispatcherTest extends TestCase
|
class EventDispatcherTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
* Test the doDispatch method properly catches any exception
|
||||||
|
* thrown from the listener invocation, i.e., <code>$className::$methodName($event)</code>,
|
||||||
|
* and replaces it with a \RuntimeException.
|
||||||
|
*
|
||||||
* @expectedException \RuntimeException
|
* @expectedException \RuntimeException
|
||||||
*/
|
*/
|
||||||
public function testListenerExceptionsAreSuppressed()
|
public function testListenerExceptionsAreSuppressed()
|
||||||
|
@ -53,6 +57,6 @@ class EventDispatcherTest extends TestCase
|
||||||
|
|
||||||
public static function call()
|
public static function call()
|
||||||
{
|
{
|
||||||
throw new Exception();
|
throw new \Exception();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue