You are here

public function MessageTemplateTest::testSetSettings in Message 8

Tests getting and setting the Settings array.

@covers ::setSettings @covers ::getSettings @covers ::getSettings

File

tests/src/Unit/Entity/MessageTemplateTest.php, line 53

Class

MessageTemplateTest
Unit tests for the message template entity.

Namespace

Drupal\Tests\message\Unit\Entity

Code

public function testSetSettings() {
  $settings = [
    'one' => 'foo',
    'two' => 'bar',
  ];
  $this->messageTemplate
    ->setSettings($settings);
  $this
    ->assertArrayEquals($settings, $this->messageTemplate
    ->getSettings());
  $this
    ->assertEquals($this->messageTemplate
    ->getSetting('one'), $this->messageTemplate
    ->getSetting('one'));
  $this
    ->assertEquals('bar', $this->messageTemplate
    ->getSetting('two'));
}