ranjitkatariya's avatar

Cannot use object of type Illuminate\Support\Facades\Config as array error while running test commad with coverage report

I have one project with Laravel 9 and I am performing testing with coverage report on it, The test cases successfully passed but I'm getting the below error, and if I remove --coverage-html tmp/coverage from command it's working fine. It means this error are occurring while generating a coverage report.

COMMAND: XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-html tmp/coverage

ERROR: Generating code coverage report in HTML format ... Cannot use object of type Illuminate\Support\Facades\Config as array

NOTE: I haven't written any new test cases it has only default two test files which come with the default laravel setup.

Please help me to figure out this issue.

0 likes
1 reply

Please or to participate in this conversation.