Added PHPUnit tests

And added support for Travis CI.