Page MenuHomeDevCentral

Ensure PHPUnit runs with XDebug in code coverage mode
ClosedPublic

Authored by dereckson on Sun, Apr 19, 10:06.

Details

Summary

Best practice for XDebug extension is to disable by default the coverage mode
as it slows too much the system, and enables it only when running unit tests.

This can be controlled by a specific php.ini file or by environment variable,
but not by passing -d value as it's an admin flag.

This is no-op when it's already set elsewhere or when another extension is used.

Even if the setting xdebug.mode is already set, PHPUnit only uses code coverage,
so it's not an issue to provide this value for phpunit run.

References:

Ref https://devcentral.nasqueron.org/T2316

Test Plan

With rKERUALD:

$ arc unit
   PASS  198ms   Keruald\OmniTools\Tests\HTTP\Requests\RequestTest

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dereckson created this revision.

We don't currently track on DevCentral our patches for nasqueron/arcanist, but for reference and documentation of T2316 resolution, it's best to publish it here too.

This revision is now accepted and ready to land.Sun, Apr 19, 10:07