Adding phpunit functional tests