Add phpunit to require-dev.
Add travis config.
Add tests for MethodMode.
Merge branch 'feature/tests' into develop