refactored tests, now using phpunit