public function CourierGlobalCollectionEntityTest::testTemplateContents in Courier 8
Same name and namespace in other branches
- 2.x tests/src/Kernel/CourierGlobalCollectionEntityTest.php \Drupal\Tests\courier\Kernel\CourierGlobalCollectionEntityTest::testTemplateContents()
Test template contents.
File
- tests/
src/ Kernel/ CourierGlobalCollectionEntityTest.php, line 27
Class
- CourierGlobalCollectionEntityTest
- Tests Courier global template collections entities.
Namespace
Drupal\Tests\courier\KernelCode
public function testTemplateContents() {
$gtc = GlobalTemplateCollection::create([
'id' => $this
->randomMachineName(),
]);
$contents = [
'message' => $this
->randomString(),
];
$gtc
->setTemplate('courier_test_message', $contents);
$this
->assertEquals($contents, $gtc
->getTemplate('courier_test_message'));
}