Question: [![](https://i.stack.imgur.com/3ptnH.png)](https://i.stack.imgur.com/3ptnH.png)

Trying to generate code coverage report excuting the command 

**phpunit --coverage-html report**.

Test execution is successful but failed to generate the report and throwing the below error:

`Class 'PHP_Token_ELLIPSIS' not found in C:\xamppNew\php\pear\PHP\Token\Stream.php:205`

Answer: 
Neither your screenshot nor your written questions contains information about the versions of PHP you are using. But we can do some detective work: Your error message contains `PHPUnit_TextUI_Command`. PHPUnit has not been using class names like that for your year. Your path contains `pear`, suggesting you installed PHPUnit using PEAR (I wonder how). PEAR-based installation has not been used for years.

It appears that you are using an outdated version of PHPUnit, with outdated dependencies of PHPUnit. With syntax in the test(ed) code that is not supported by one of the dependencies of PHPUnit, namely php-token-stream.
First of all thanks to **Sebastian Bergmann** for looking into the question and giving best possible input from your end, even though you found some required information missing to answer this question.
Actually I didn't install PHPUnit using PEAR. But I installed XAMPP and in that case PHP and PHPUnit comes along with it.
Current version of PHP and PHPUnit running in my system are PHP 7.2.27 and PHPUnit 3.7.21 respectively and you guessed it right that PHPunit is the outdated one.

But still I was able to resolve the issue as I mentioned in my conversation with Noam.
From the phpunit.xml file I have removed the name of the file for which I wanted to generate the PHPUnit testing coverage report.Now only keeping the path of the file to be tested and it worked.

**Earlier Approach:**
[![enter image description here](https://i.stack.imgur.com/WD7vQ.png)](https://i.stack.imgur.com/WD7vQ.png)

**Current Working Approach:**
[![enter image description here](https://i.stack.imgur.com/MyktU.png)](https://i.stack.imgur.com/MyktU.png)