Unit tests

* Add some unit tests
* Fix phpunit configuration file
* remove useless methods