insert([ 'id' => 1, 'code' => 'welcome', 'variant' => 'default', 'subject' => 'Hello', 'body_html' => 'Body', 'is_active' => 1, ]); $service = new CommunicationTemplateService(); $templates = $service->listActiveTemplates(); $this->assertSame('welcome', $templates[0]['template_key']); $this->assertSame('Body', $templates[0]['body']); } }