You appear to be a bot. Output may be restricted
Description
Locate the expected wp-config.php when running under PHPUnitWhen being run under PHPUnit in Windows environments with symlinked directories we can't simply reset the current working directory as this can lead us to the wrong wp-config.php. So we need to work downwards to the directory saved in the PRE_PHPUNIT_CD environment variable. For more information see notes in https://github.com/bobbingwide/oik-batch/issues/9
Usage
oik_batch_locate_wp_config_for_phpunit();
Parameters
Returns
voidSource
File name: oik-batch/libs/oik-cli.phpLines:
1 to 11 of 11
function oik_batch_locate_wp_config_for_phpunit() { $abspath = null; if ( false !== strpos( $_SERVER['argv'][0], "phpunit" ) ) { $pre_phpunit_cd = getenv( "PRE_PHPUNIT_CD" ); if ( $pre_phpunit_cd ) { echo "Searching for wp-config.php in directories leading to: $pre_phpunit_cd" . PHP_EOL; $abspath = oik_batch_cd_drill_down( $pre_phpunit_cd ); } } return( $abspath ); }View on GitHub