added phpunit and copied unit tests