From cac5a0f6541e078e0658be97b3812e765933277e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Wed, 18 Mar 2026 15:43:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=BC=BA=E5=BF=AB=E6=8D=B7=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E4=B8=8D=E7=BB=A7=E6=89=BF=E5=B7=A5=E5=85=B7=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E6=8A=A4=E6=A0=8F=EF=BC=88=E5=AF=B9=E8=B4=A6/?= =?UTF-8?q?=E9=80=80=E6=AC=BE=E4=B8=8D=E4=B8=80=E8=87=B4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...FiltersShouldNotInheritToolTogglesTest.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) 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); } }