From b419d95b0bb98bc6b33ef5571d0eddf66b82fb84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Wed, 18 Mar 2026 03:58:57 +0800 Subject: [PATCH] test(platform-orders): cover bmpa_processable_only combined filters without enforcing UI sanitization --- ...tBreakWhenCombinedWithOtherFiltersTest.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/Feature/AdminPlatformOrderBmpaProcessableOnlyShouldNotBreakWhenCombinedWithOtherFiltersTest.php diff --git a/tests/Feature/AdminPlatformOrderBmpaProcessableOnlyShouldNotBreakWhenCombinedWithOtherFiltersTest.php b/tests/Feature/AdminPlatformOrderBmpaProcessableOnlyShouldNotBreakWhenCombinedWithOtherFiltersTest.php new file mode 100644 index 0000000..b8692c7 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderBmpaProcessableOnlyShouldNotBreakWhenCombinedWithOtherFiltersTest.php @@ -0,0 +1,31 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_platform_orders_bmpa_processable_only_can_coexist_with_other_filters_without_error(): void + { + $this->loginAsPlatformAdmin(); + + // 说明:bmpa_processable_only 本身在 applyFilters() 会强制限定 status/payment_status 等口径。 + // 若用户同时带了其它筛选(例如 status/payment_status/sync_status/bmpa_failed_only),结果可能为空,但不应报错/500。 + $this->get('/admin/platform-orders?bmpa_processable_only=1&status=activated&payment_status=paid&sync_status=synced&bmpa_failed_only=1') + ->assertOk(); + } +}