diff --git a/tests/Feature/AdminPlatformOrderIndexQuickFiltersShouldNotInheritToolTogglesTest.php b/tests/Feature/AdminPlatformOrderIndexQuickFiltersShouldNotInheritToolTogglesTest.php index 7e56d27..88f72db 100644 --- a/tests/Feature/AdminPlatformOrderIndexQuickFiltersShouldNotInheritToolTogglesTest.php +++ b/tests/Feature/AdminPlatformOrderIndexQuickFiltersShouldNotInheritToolTogglesTest.php @@ -54,5 +54,31 @@ class AdminPlatformOrderIndexQuickFiltersShouldNotInheritToolTogglesTest extends $this->assertSame('1', (string) ($q2['merchant_id'] ?? '')); $this->assertArrayNotHasKey('bmpa_failed_only', $q2); $this->assertArrayNotHasKey('fail_only', $q2); + + // 3) 快捷筛选:对账不一致 + $this->assertMatchesRegularExpression('/]*href="([^"]+)"[^>]*class="muted"[^>]*>对账不一致<\/a>/', $html); + preg_match('/]*href="([^"]+)"[^>]*class="muted"[^>]*>对账不一致<\/a>/', $html, $m3); + $href3 = html_entity_decode($m3[1] ?? ''); + $query3 = parse_url($href3, PHP_URL_QUERY) ?: ''; + parse_str($query3, $q3); + + $this->assertSame('1', (string) ($q3['reconcile_mismatch'] ?? '')); + $this->assertSame('1', (string) ($q3['merchant_id'] ?? '')); + $this->assertArrayNotHasKey('bmpa_failed_only', $q3); + $this->assertArrayNotHasKey('bmpa_error_keyword', $q3); + $this->assertArrayNotHasKey('fail_only', $q3); + + // 4) 快捷筛选:退款不一致 + $this->assertMatchesRegularExpression('/]*href="([^"]+)"[^>]*class="muted"[^>]*>退款不一致<\/a>/', $html); + preg_match('/]*href="([^"]+)"[^>]*class="muted"[^>]*>退款不一致<\/a>/', $html, $m4); + $href4 = html_entity_decode($m4[1] ?? ''); + $query4 = parse_url($href4, PHP_URL_QUERY) ?: ''; + parse_str($query4, $q4); + + $this->assertSame('1', (string) ($q4['refund_inconsistent'] ?? '')); + $this->assertSame('1', (string) ($q4['merchant_id'] ?? '')); + $this->assertArrayNotHasKey('bmpa_failed_only', $q4); + $this->assertArrayNotHasKey('bmpa_error_keyword', $q4); + $this->assertArrayNotHasKey('fail_only', $q4); } }