made changes to allow before in routing
changed wrong method call
added unit tests and make usuage of phpunit using composer
add phpunit tests, fixed typo in method