Files
saasshop/tests/Feature/AdminPlatformOrderToolsPaidNoReceiptHintShouldContainPrimaryAndGovernanceActionsTest.php
2026-03-19 03:01:41 +08:00

33 lines
1.0 KiB
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderToolsPaidNoReceiptHintShouldContainPrimaryAndGovernanceActionsTest 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_hint_should_contain_primary_and_governance_actions(): 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]*?定位到批量同步订阅工具[\s\S]*?切到有回执集合[\s\S]*?取消只看可同步(先治理)/u', $html);
}
}