Skip to content

Commit e7a1c17

Browse files
committed
Make WpdbExposedMethodsForTesting helper class extend WP_SQLite_DB
1 parent 14fe48e commit e7a1c17

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wp-setup.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ cp "$DIR"/db.copy "$WP_DIR"/src/wp-content/db.php
5858
sed -i.bak "s#'{SQLITE_IMPLEMENTATION_FOLDER_PATH}'#__DIR__.'/plugins/sqlite-database-integration'#g" "$WP_DIR"/src/wp-content/db.php
5959
sed -i.bak "s#{SQLITE_PLUGIN}#$WP_DIR/src/wp-content/plugins/sqlite-database-integration/load.php#g" "$WP_DIR"/src/wp-content/db.php
6060

61-
# 5. Install dependencies.
61+
# 5. Rewrite helper class WpdbExposedMethodsForTesting to extend WP_SQLite_DB.
62+
echo "Rewriting helper class 'WpdbExposedMethodsForTesting' to extend WP_SQLite_DB..."
63+
sed -i.bak "s#class WpdbExposedMethodsForTesting extends wpdb {#class WpdbExposedMethodsForTesting extends WP_SQLite_DB {#g" "$WP_DIR"/tests/phpunit/includes/utils.php
64+
65+
# 6. Install dependencies.
6266
echo "Installing dependencies..."
6367
npm --prefix "$WP_DIR" install

0 commit comments

Comments
 (0)