phpunit toggle function