ensure unit test install ABSPATH is a real path (#36641)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
This commit is contained in:
parent
6ba45889b6
commit
73a6475a3d
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: fix
|
||||
|
||||
Fix WordPress unit tests libraries being installed in a symlinked folder structure
|
|
@ -126,7 +126,7 @@ install_test_suite() {
|
|||
if [ ! -f wp-tests-config.php ]; then
|
||||
download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php
|
||||
# remove all forward slashes in the end
|
||||
WP_CORE_DIR=$(echo $WP_CORE_DIR | sed "s:/\+$::")
|
||||
WP_CORE_DIR=$(realpath $(echo $WP_CORE_DIR | sed "s:/\+$::"))
|
||||
sed $ioption -E "s:(__DIR__ . '/src/'|dirname\( __FILE__ \) . '/src/'):'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php
|
||||
sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php
|
||||
sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php
|
||||
|
|
Loading…
Reference in New Issue