Refactored tests.
Fixed phing task class. Added tests.