Files
saasshop/tests/Feature/AdminJsCopyFailuresShouldUseToastErrorFirstTest.php

21 lines
539 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminJsCopyFailuresShouldUseToastErrorFirstTest extends TestCase
{
use RefreshDatabase;
public function test_copy_failures_should_use_toast_error_first(): void
{
$js = file_get_contents(public_path('js/admin.js'));
$this->assertIsString($js);
// 复制失败时应优先 toastErroralert 作为降级)
$this->assertStringContainsString("toastError('复制失败", $js);
}
}