42 lines
1.2 KiB
PHP
42 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminPlatformOrderToolsGovernanceHintTest 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_show_governance_hint_when_reconcile_mismatch_filter_present(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$this->get('/admin/platform-orders?reconcile_mismatch=1')
|
|
->assertOk()
|
|
->assertSee('建议先完成金额/状态治理', false)
|
|
->assertSee('对账不一致', false);
|
|
}
|
|
|
|
public function test_platform_orders_tools_show_governance_hint_when_refund_inconsistent_filter_present(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$this->get('/admin/platform-orders?refund_inconsistent=1')
|
|
->assertOk()
|
|
->assertSee('建议先完成金额/状态治理', false)
|
|
->assertSee('退款不一致', false);
|
|
}
|
|
}
|