test: 移植 ListingStatsTest(9 tests)
unit bootstrap 改載入真實 TMDO_Listing_Stats:先 define TMDO_TEST_SKIP_LISTING_STATS_STUB,核心 bootstrap 便會跳過它的 stub。 145 → 154 tests。
This commit is contained in:
+4
-3
@@ -13,6 +13,9 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
// Load the real TMDO_Listing_Stats below instead of core's stub.
|
||||
define( 'TMDO_TEST_SKIP_LISTING_STATS_STUB', true );
|
||||
|
||||
$tmdo_core_bootstrap = dirname( __DIR__, 2 ) . '/2meet-data-optimizer/tests/bootstrap.php';
|
||||
if ( ! file_exists( $tmdo_core_bootstrap ) ) {
|
||||
throw new RuntimeException(
|
||||
@@ -44,9 +47,7 @@ $tmdo_hp_files = array(
|
||||
'includes/class-tmdo-hivepress-transient-filter.php',
|
||||
'includes/class-tmdo-hivepress-term-comment-fields.php',
|
||||
'includes/class-tmdo-hpct-import.php',
|
||||
// class-tmdo-listing-stats.php is deliberately NOT loaded: the core unit
|
||||
// bootstrap already declares a TMDO_Listing_Stats stub, and no test in this
|
||||
// suite exercises the real implementation.
|
||||
'includes/class-tmdo-listing-stats.php',
|
||||
'admin/class-tmdo-admin-hivepress.php',
|
||||
'cli/class-tmdo-cli-hivepress.php',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user