Skip to content
Browse files

Fix unit tests broken in #1076.

  • Loading branch information...
1 parent b6db155 commit 769fab9aab34662db3c1f889e44078fb3b03372c @realityking realityking committed Mar 30, 2012
Showing with 17 additions and 6 deletions.
  1. +17 −6 tests/suites/unit/joomla/event/JDispatcherTest.php
View
23 tests/suites/unit/joomla/event/JDispatcherTest.php
@@ -50,6 +50,7 @@ protected function tearDown()
* @return void
*
* @since 11.3
+ * @covers JDispatcher::getInstance
*/
public function testGetInstance()
{
@@ -88,6 +89,7 @@ public function testGetInstance()
* @return void
*
* @since 11.3
+ * @covers JDispatcher::getState
*/
public function testGetState()
{
@@ -108,6 +110,7 @@ public function testGetState()
* Test JDispatcher::register().
*
* @since 11.3
+ * @covers JDispatcher::register
*/
public function testRegister()
{
@@ -190,14 +193,20 @@ public function testRegister()
)
)
);
-
- //Now we trigger an error with an invalid handler
- $error = $this->object->register('fakeevent', 'nonExistingClass');
- $this->assertTrue(
- is_a($error, 'JException')
- );
}
+ /**
+ * Test JDispatcher::register() with an error.
+ *
+ * @since 12.1
+ * @expectedException InvalidArgumentException
+ * @covers JDispatcher::register
+ */
+ public function testRegisterException()
+ {
+ $this->object->register('fakeevent', 'nonExistingClass');
+ }
+
/**
* Test JDispatcher::trigger().
*
@@ -249,6 +258,7 @@ public function testTrigger()
* Test JDispatcher::attach().
*
* @since 11.3
+ * @covers JDispatcher::attach
*/
public function testAttach()
{
@@ -387,6 +397,7 @@ public function testAttach()
* Test JDispatcher::detach().
*
* @since 11.3
+ * @covers JDispatcher::detach
*/
public function testDetach()
{

0 comments on commit 769fab9

Please sign in to comment.
Something went wrong with that request. Please try again.