mirror of
https://fast.feibisi.com/https://github.com/wp-cli/scaffold-command.git
synced 2025-10-03 16:51:08 +08:00
Code Modernization: Replace dirname( __FILE__ )
calls with __DIR__
magic constant.
Follow to the commit in WP Core e72fff9cef/wp-tests-config-sample.php
As previous version of wp-tests-config-sample.php can be downloaded with previous WP Core version, I keep replacement of `dirname( __FILE__ )`, and add replacement of `__DIR__`.
This commit is contained in:
parent
ee48bb10bc
commit
fcf38f11f4
1 changed files with 1 additions and 0 deletions
|
@ -116,6 +116,7 @@ install_test_suite() {
|
|||
# remove all forward slashes in the end
|
||||
WP_CORE_DIR=$(echo $WP_CORE_DIR | sed "s:/\+$::")
|
||||
sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php
|
||||
sed $ioption "s:__DIR__ . '/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
|
||||
sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue