Skip to content

Forward xdebug cookie to mink session

mstrelan requested to merge mstrelan/drupal-test-traits:xdebug-cookie into 2.x

Currently we can debug tests by setting env vars in the CLI, but these env vars aren't forwarded to the Drupal site, so we can't debug the SUT when xdebug.start_with_request is set to trigger.

Drupal core handles this in BrowserTestBase with a trait to detect xdebug cookies and forwards them to the mink session. We can do the same in DTT.

To use this ensure xdebug is configured in trigger mode (as above) and run XDEBUG_SESSION=1 phpunit tests/myTest.php

Edited by mstrelan

Merge request reports