You are here

public function CourierGlobalCollectionEntityTest::testGetTemplateCollection in Courier 8

Same name and namespace in other branches
  1. 2.x tests/src/Kernel/CourierGlobalCollectionEntityTest.php \Drupal\Tests\courier\Kernel\CourierGlobalCollectionEntityTest::testGetTemplateCollection()

Test local template collection was instantiated.

Tests the effect of the method. Details of the method are in the global template manager service tests.

File

tests/src/Kernel/CourierGlobalCollectionEntityTest.php, line 40

Class

CourierGlobalCollectionEntityTest
Tests Courier global template collections entities.

Namespace

Drupal\Tests\courier\Kernel

Code

public function testGetTemplateCollection() {
  $gtc = GlobalTemplateCollection::create([
    'id' => $this
      ->randomMachineName(),
  ]);
  $gtc
    ->save();
  $this
    ->assertEquals(0, count(TemplateCollection::loadMultiple()));
  $gtc
    ->getTemplateCollection();
  $this
    ->assertEquals(1, count(TemplateCollection::loadMultiple()));
}