Added more PHP Unit tests
Fixed minor bug