php - Hide normal failure output from phpunit assert -



php - Hide normal failure output from phpunit assert -

by default, when assert fails in phpunit print out error along values of variables in assert. usefull behavior, in case prints out big block of useless info (i'm asserting object has been destroyed) clutters error output.

i tried passing error message optional 2nd parameter, output error above standard phpunit output. there method hide standard error output?

here current assert: $this->assertfalse($json, 'json not removed');

although bad practice (precisely because hide actual values), in case can comparing yourself:

$this->asserttrue(false === $json, 'json not removed');

another way assertempty. won't dump array , pass if $json false:

$this->assertempty($json, 'json not removed');

php unit-testing phpunit

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -