You are here

public function TemplateTest::setUp in Wysiwyg API template plugin 3.0.x

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/Entity/TemplateTest.php \Drupal\Tests\wysiwyg_template\Kernel\Entity\TemplateTest::setUp()

Overrides KernelTestBase::setUp

File

tests/src/Kernel/Entity/TemplateTest.php, line 33

Class

TemplateTest
Tests the template config entity.

Namespace

Drupal\Tests\wysiwyg_template\Kernel\Entity

Code

public function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('wysiwyg_template');
  $this
    ->installEntitySchema('node_type');
  foreach (range(1, 3) as $i) {
    $this->nodeTypes[$i] = NodeType::create([
      'type' => strtolower($this
        ->randomMachineName()),
      'name' => $this
        ->randomString(),
    ]);
    $this->nodeTypes[$i]
      ->save();
  }
}