pestphp / pest

Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
https://pestphp.com
MIT License
9.06k stars 313 forks source link

[Bug]: Text coverage not compatible with coverage-php #1160

Open caendesilva opened 1 month ago

caendesilva commented 1 month ago

What Happened

Seems to be unable to get serialized test coverage whilst also printing the standard text to console.

# Creates test.cov but gives no text output
vendor/bin/pest --coverage-text --coverage-php=test.cov 

# Prints text, but creates no test.cov due to "WARN  Option --coverage-php cannot be used more than once"
vendor/bin/pest --coverage --coverage-text --coverage-php=test.cov 

How to Reproduce

Fresh laravel new with Pest

Sample Repository

No response

Pest Version

2.34.7

PHP Version

8.3.7

Operation System

macOS

Notes

php -v

PHP 8.3.7 (cli) (built: May 10 2024 12:47:16) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.7, Copyright (c) Zend Technologies
    with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans
    with Zend OPcache v8.3.7, Copyright (c), by Zend Technologies
caendesilva commented 1 month ago

Additionally, and possibly related, when using the PHP coverage, I completely lose ANSI formatting.