补强平台订单回执筛选结构护栏测试

This commit is contained in:
萝卜
2026-03-19 01:59:58 +08:00
parent 0612224c86
commit 3e210c6140

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderFiltersReceiptStatusHintShouldCoexistWithReceiptOptionsTest 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_receipt_status_hint_should_coexist_with_receipt_options(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertMatchesRegularExpression('/全部回执状态[\s\S]*?有回执[\s\S]*?无回执(广义)[\s\S]*?已付无回执/u', $html);
}
}