feat(invoice): 添加发票发送功能并进行测试

- 在 InvoiceRepo 中添加 send 方法,用于发送发票邮件
- 在 CreateInvoiceTest 中添加测试用例,验证发票发送功能
This commit is contained in:
李东云
2025-09-04 15:06:23 +08:00
parent 2a40b3b219
commit 72f7d37382
2 changed files with 26 additions and 0 deletions

View File

@@ -34,3 +34,14 @@ it('should can create invoice', function () {
expect($invoice)
->toBeInstanceOf(Invoice::class);
});
it('should can send invoice email to receiver', function () {
$repo = make(InvoiceRepo::class);
expect((function () use ($repo) {
$invoice_no = '517268';
$repo->send($invoice_no);
return true;
})())->not->toThrow(Throwable::class);
});