phpunit tests

Added phpunit tests