Fixing bug in phpunit state