Skip to content

Commit

Permalink
Adding tests for a trigger call for unknown event
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-aranda committed Apr 10, 2015
1 parent bb2589f commit 2e1efa9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/PHPRocks/EventHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function trigger($event_name, $arguments = [])
call_user_func_array($event, $arguments);
}

return true;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions tests/PHPRocks/EventHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,9 @@ public function testRemoveEventHandlerNotFoundEventDueClosure()

}

public function testTriggerUnknownEvent()
{
$this->assertNull($this->event_handler->trigger('random_event_this'));
}

}

0 comments on commit 2e1efa9

Please sign in to comment.