PHPUnit - PHP_Token_Stream error when covering clover

I am using PHPUnit 3.5.10 and have a problem trying to generate xml reports to cover clover.

Export using html coverage works fine. Also, if I exclude enough files from the coverage report, it will generate a clover.xml file. However, when I run my test suite, I get the message "Writing code coverage data to an XML file, this may take some time." Then execution is not executed. Every 1 out of 25 times, I get a "Segmentation Error" message.

I initially traced this problem with the PHP_CodeCoverage :: getSummary () function, however, when I limited the coverage of the code to a white list, the program passed this error.

Further, code coverage reports seem to time out in the PHP_Token_Stream :: scan () function. In fact, after a cumulative number of tokens of 31 thousand has been processed, the Method simply stops without an error message.

I noticed a correlation with the amount of tracking code I set and the number of tokens that the method will process. Thus, it would seem that the program may have a shortage of memory.

I created a test to load into a bunch of code files and tested PHP_Token_Stream by downloading the files one by one. It seems to function as expected and does not replicate the error, as it appears in the context of a test suite.

Any suggestions on how to display clover coverage reports?

+3
source share
1 answer

1 , 2 , . PHP,

ini_set('memory_limit', '1024M');
+2

All Articles