补强平台订单收付异常治理衔接护栏

This commit is contained in:
萝卜
2026-03-19 02:38:55 +08:00
parent ed1a74c39b
commit 87de9e80ad

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderQuickFiltersShouldKeepReceiptGovernanceAnomalyTripletTest extends TestCase
{
use RefreshDatabase;
protected function loginAsPlatformAdmin(): void
{
$this->seed();
$this->post('/admin/login', [
'email' => 'platform.admin@demo.local',
'password' => 'Platform@123456',
])->assertRedirect('/admin');
}
public function test_platform_orders_quick_filters_should_keep_receipt_governance_anomaly_triplet(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertMatchesRegularExpression('/po-quickfilter-paid-no-receipt[\s\S]*?已付无回执[\s\S]*?po-quickfilter-reconcile-mismatch[\s\S]*?对账不一致[\s\S]*?po-quickfilter-refund-inconsistent[\s\S]*?退款不一致/u', $html);
}
}