Add some more test cases and tests to JHelper.

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32198&start=0