tests: started porting tests to phpunit