Improve phpunit tests