You are here

public function JsonLogDataTest::testSiteTagsCanBeSetAlone in JSONlog 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/JsonLogDataTest.php \Drupal\Tests\jsonlog\Unit\JsonLogDataTest::testSiteTagsCanBeSetAlone()
  2. 3.x tests/src/Unit/JsonLogDataTest.php \Drupal\Tests\jsonlog\Unit\JsonLogDataTest::testSiteTagsCanBeSetAlone()

File

tests/src/Unit/JsonLogDataTest.php, line 238

Class

JsonLogDataTest
Unit tests for JsonLogData class

Namespace

Drupal\Tests\jsonlog\Unit

Code

public function testSiteTagsCanBeSetAlone() {
  $this->data = new JsonLogData('test_site_id', 'test_canonical');
  $site_tags = 'x,y';
  $this->data
    ->setTags('', $site_tags);
  $this
    ->assertArrayEquals([
    'x',
    'y',
  ], $this->data
    ->getTags(), 'All site tags present.');
}