Unit tests

Add some phpunit tests