feat: email gửi tay/nhắc gia hạn, gói hosting, sửa dữ liệu sản phẩm
- Gửi email theo template cho 1 khách, tab lịch sử email, nhắc gia hạn dịch vụ hàng loạt - Mail lưu from/bcc/sent_by; mẫu MARKETING và mẫu cũ trong TemplateSeeder - Gói hosting: giới hạn, trạng thái, lấy plan Plesk qua CLI gateway - Backfill payment_method và ngày đơn hàng còn thiếu - Bổ sung field CPU/RAM/Disk/Băng thông cho loại sản phẩm vps và cloud Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8651dde6b1
commit
30898ea46f
@@ -30,9 +30,18 @@ class TemplateSeederTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function test_legacy_templates_use_the_shared_shell(): void
|
||||
{
|
||||
foreach (TemplateSeeder::legacyTemplates() as $item) {
|
||||
$this->assertNull(EmailScenarioRegistry::find($item['scenario']), $item['scenario']);
|
||||
$this->assertStringContainsString('class="Header"', $item['message'], $item['scenario']);
|
||||
$this->assertStringContainsString('class="Footer"', $item['message'], $item['scenario']);
|
||||
}
|
||||
}
|
||||
|
||||
public function test_every_placeholder_has_a_variable_definition(): void
|
||||
{
|
||||
foreach (TemplateSeeder::templates() as $item) {
|
||||
foreach ([...TemplateSeeder::templates(), ...TemplateSeeder::legacyTemplates()] as $item) {
|
||||
$unknown = array_diff(MailPlaceholders::extract($item['subject'], $item['message']), array_keys(TemplateVariables::DEFINITIONS));
|
||||
$this->assertSame([], array_values($unknown), $item['scenario']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user