php - Hide output during test execution -


i have var_dumps in php code (i understand there must none in end, still), , while tests running outputs non necessary information console, there method ignore code execution?

i've tried

/**  * @codecoverageignore  */ 

and

// @codecoverageignorestart print '*'; // @codecoverageignoreend 

but ignores coverage, , still executes code.

you can set setoutputcallback nothing function. effect suppress output printed in test or in tested class.

as example:

namespace acme\demobundle\tests;   class nooutputtest extends \phpunit_framework_testcase {      public function testsuppressedoutput()     {         // suppress  output console         $this->setoutputcallback(function() {});         print '*';         $this->assertfalse(false, "don't see *");     }  } 

you can find reference in doc

hope help


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -