kenjis / codeigniter-testing-guide

CodeIgniter Testing Guide
0 stars 2 forks source link

Test result prints out JSON #5

Open bigweld86 opened 7 years ago

bigweld86 commented 7 years ago

Hi,

I've been following you guide since I'm trying to get my company into TDD. After setting up PHPUnit with Codeigniter a couple weeks ago and running 2 or 3 simple tests everything seemed to be working fine.

When executing: php phpunit.phar --debug

The result set was something like:

Starting test 'Welcome_test::test_index'.. Starting test 'Welcome_test::test_method_404'.. Starting test 'Welcome_test::test_APPPATH'..

Time: 1.23 seconds, Memory: 13.25 Mb

OK (3 Tests, 3 Assertions) After some time without using it, I went back and ran some simple tests again, but now the results include a JSON object:

{ "event": "suiteStart", "suite": "Codeigniter Application Test Suite", "tests": 20 } { "event": "suiteStart", "suite": "Welcome_test", "tests": 3 } { "event": "testStart", "suite": "Welcome_test", "tests": "Welcome_test::test_index" } Starting test 'Welcome_test::test_index'. { "event": "test", "suite": "Welcome_test", "tests": "Welcome_test::test_index", "status": "pass", "time": 0.00498656565, "trace": [], "message": "", "output": "" } ....

Time: 1.23 seconds, Memory: 13.25 Mb OK (3 Tests, 3 Assertions)

That JSON output is VisualPHPUnit to break, but I don't remember doing anything to get that result.

Any ideas on what to do in order not to print that JSON result?

Thanks

kenjis commented 6 years ago

@bigweld86 Remove the <listeners> in application/tests/phpunit.xml, please.