Fix setting wp-config.php for acceptance tests

The wp-config properties were not set correctly because there reg exp
that was used in sed was no longer matching the default value.
This was causing e.g. that errors and warnings were not caught by the acceptnace tests.
[MAILPOET-4511]
This commit is contained in:
Rostislav Wolny
2022-07-27 13:39:29 +02:00
committed by Veljko V
parent e53505354a
commit 3d4155f6cc

View File

@@ -135,13 +135,12 @@ CONFIG+="define('WP_DEBUG', true);\n"
CONFIG+="define('WP_DEBUG_DISPLAY', true);\n"
CONFIG+="define('WP_DEBUG_LOG', true);\n"
CONFIG+="define('COOKIE_DOMAIN', \$_SERVER['HTTP_HOST']);\n"
CONFIG+="define('WP_AUTO_UPDATE_CORE', false);\n"
CONFIG+="define('DISABLE_WP_CRON', true);\n"
# fix for WP CLI bug (https://core.trac.wordpress.org/ticket/44569)
CONFIG+="if (!isset(\$_SERVER['SERVER_NAME'])) \$_SERVER['SERVER_NAME'] = '';\n"
sed -i "s/define( *'WP_DEBUG', false *);/$CONFIG/" /wp-core/wp-config.php
sed -i "s/define( *'WP_DEBUG', !!getenv_docker('WORDPRESS_DEBUG', '')* );/$CONFIG/" /wp-core/wp-config.php
# activate theme
wp theme activate twentytwentyone