Rewrite tests with PHPUnit