{"action":"closed","issue":{"url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/37","labels_url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/37/comments","events_url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/37/events","html_url":"https://github.com/kenjis/ci-phpunit-test/issues/37","id":98570962,"number":37,"title":"PHP Warning:  Cannot modify header information - headers already sent by (output started at ...)","user":{"login":"kenjis","id":87955,"avatar_url":"https://avatars.githubusercontent.com/u/87955?v=3","gravatar_id":"","url":"https://api.github.com/users/kenjis","html_url":"https://github.com/kenjis","followers_url":"https://api.github.com/users/kenjis/followers","following_url":"https://api.github.com/users/kenjis/following{/other_user}","gists_url":"https://api.github.com/users/kenjis/gists{/gist_id}","starred_url":"https://api.github.com/users/kenjis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenjis/subscriptions","organizations_url":"https://api.github.com/users/kenjis/orgs","repos_url":"https://api.github.com/users/kenjis/repos","events_url":"https://api.github.com/users/kenjis/events{/privacy}","received_events_url":"https://api.github.com/users/kenjis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kenjis/ci-phpunit-test/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-02T00:36:49Z","updated_at":"2015-08-03T09:46:48Z","closed_at":"2015-08-03T09:46:48Z","body":"Q | A\r\n--- | ---\r\nversion | 1.0.x@dev (dev-master; after v0.5.0)\r\nPHP | PHP 5.5.9-1ubuntu4.11 (cli) (built: Jul  2 2015 15:17:32)\r\nOS | Ubuntu 14.04\r\n\r\nThe warnings like below appear.\r\n\r\n> PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/kenji/tmp/ci-app-for-ci-phpunit-test/vendor/phpunit/phpunit/src/Util/Printer.php:133) in /home/kenji/tmp/ci-app-for-ci-phpunit-test/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php on line 84\r\n\r\nThis error is related to monkey patching. If I turn it off, the errors will be gone. \r\n\r\nAnd if I run tests again, the errors also will be gone. That is, if once patched source files are cached, the errors will be gone.\r\n\r\nHow to reproduce:\r\n\r\n~~~\r\n$ git clone https://github.com/kenjis/ci-app-for-ci-phpunit-test.git\r\n$ cd ci-app-for-ci-phpunit-test\r\n$ composer update\r\n$ ./install.php\r\n$ cd application/tests/\r\n$ ../../vendor/bin/phpunit\r\n~~~\r\n\r\nOutput:\r\n\r\n~~~\r\nPHPUnit 4.7.7 by Sebastian Bergmann and contributors.\r\nWarning:\tThe Xdebug extension is not loaded\r\n\t\tNo code coverage will be generated.\r\n\r\n..........................PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/kenji/tmp/ci-app-for-ci-phpunit-test/vendor/phpunit/phpunit/src/Util/Printer.php:133) in /home/kenji/tmp/ci-app-for-ci-phpunit-test/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php on line 84\r\n...PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/kenji/tmp/ci-app-for-ci-phpunit-test/vendor/phpunit/phpunit/src/Util/Printer.php:133) in /home/kenji/tmp/ci-app-for-ci-phpunit-test/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php on line 84\r\n....PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/kenji/tmp/ci-app-for-ci-phpunit-test/vendor/phpunit/phpunit/src/Util/Printer.php:133) in /home/kenji/tmp/ci-app-for-ci-phpunit-test/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php on line 87\r\n................PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/kenji/tmp/ci-app-for-ci-phpunit-test/vendor/phpunit/phpunit/src/Util/Printer.php:133) in /home/kenji/tmp/ci-app-for-ci-phpunit-test/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php on line 87\r\n.PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/kenji/tmp/ci-app-for-ci-phpunit-test/vendor/phpunit/phpunit/src/Util/Printer.php:133) in /home/kenji/tmp/ci-app-for-ci-phpunit-test/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php on line 87\r\n.PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/kenji/tmp/ci-app-for-ci-phpunit-test/vendor/phpunit/phpunit/src/Util/Printer.php:133) in /home/kenji/tmp/ci-app-for-ci-phpunit-test/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php on line 84\r\n.PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/kenji/tmp/ci-app-for-ci-phpunit-test/vendor/phpunit/phpunit/src/Util/Printer.php:133) in /home/kenji/tmp/ci-app-for-ci-phpunit-test/application/tests/_ci_phpunit_test/replacing/helpers/url_helper.php on line 84\r\n............. 65 / 70 ( 92%)\r\n.....\r\n\r\nTime: 7.15 seconds, Memory: 19.25Mb\r\n\r\nOK (70 tests, 101 assertions)\r\n~~~\r\n"}}