Files
saasshop/tests/Feature/AdminPlatformOrderToolsPaidNoReceiptFootnoteShouldStayInsideHintBlockTest.php
2026-03-19 04:35:36 +08:00

33 lines
1.0 KiB
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderToolsPaidNoReceiptFootnoteShouldStayInsideHintBlockTest 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_tools_paid_no_receipt_footnote_should_stay_inside_hint_block(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders?syncable_only=1&receipt_status=none');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertMatchesRegularExpression('/data-role="po-tools-paid-no-receipt-hint"[\s\S]*?data-role="po-tools-paid-no-receipt-footnote"[\s\S]*?收费闭环优先:先补回执,再推进同步。/u', $html);
}
}