Debugging PHP Unit without IDE/xdebug -
how debug phpunit tests without ide or xdebug? fact phpunit buffers output seems mean must use debugger or ide or use $this->expectoutputstring
+ print_r()
(or whatever) , bunch of comments (since exepcts assertions evaluated last, i've had comment out (failing) assertions).
what's best practice here?
imo xdebug + ide best way debug tests. if want use old fashion method printing on screen use stderr output instead stdout.
for example:
fprintf(stderr, "some label\n"); fprintf(stderr, "array dump: %s\n", var_export($somearray, true));
cheers!
Comments
Post a Comment