public function JsonLogDataTest::testServerTagsCanBeSetAlone in JSONlog 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/JsonLogDataTest.php \Drupal\Tests\jsonlog\Unit\JsonLogDataTest::testServerTagsCanBeSetAlone()
- 3.x tests/src/Unit/JsonLogDataTest.php \Drupal\Tests\jsonlog\Unit\JsonLogDataTest::testServerTagsCanBeSetAlone()
File
- tests/
src/ Unit/ JsonLogDataTest.php, line 227
Class
- JsonLogDataTest
- Unit tests for JsonLogData class
Namespace
Drupal\Tests\jsonlog\UnitCode
public function testServerTagsCanBeSetAlone() {
$this->data = new JsonLogData('test_site_id', 'test_canonical');
$server_tags = 'a,b';
$this->data
->setTags($server_tags, '');
$this
->assertArrayEquals([
'a',
'b',
], $this->data
->getTags(), 'All server tags present.');
}