Porting test to PHPUnit