prefix}wc_order_stats", "{$wpdb->prefix}wc_order_product_lookup", "{$wpdb->prefix}wc_order_tax_lookup", "{$wpdb->prefix}wc_order_coupon_lookup", "{$wpdb->prefix}wc_admin_notes", "{$wpdb->prefix}wc_admin_note_actions", "{$wpdb->prefix}wc_customer_lookup", "{$wpdb->prefix}wc_category_lookup", ); // Remove any existing tables in the environment. $query = 'DROP TABLE IF EXISTS ' . implode( ',', $tables ); $wpdb->query( $query ); // phpcs:ignore. // Try to create the tables. Install::create_tables(); $result = $wpdb->get_col( "SHOW TABLES LIKE '{$wpdb->prefix}%'" ); // Check all the tables exist. foreach ( $tables as $table ) { $this->assertContains( $table, $result ); } } }