assertIsString($js); // 成功路径不应再依赖 alert(用 toast + 按钮短反馈即可) $this->assertStringNotContainsString("window.alert('已复制", $js); } }