function TagsTest::testImplodeTags

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Common/TagsTest.php \Drupal\Tests\Core\Common\TagsTest::testImplodeTags()
  2. 8.9.x core/tests/Drupal/Tests/Core/Common/TagsTest.php \Drupal\Tests\Core\Common\TagsTest::testImplodeTags()
  3. 10 core/tests/Drupal/Tests/Core/Common/TagsTest.php \Drupal\Tests\Core\Common\TagsTest::testImplodeTags()

Implodes a series of tags.

File

core/tests/Drupal/Tests/Core/Common/TagsTest.php, line 38

Class

TagsTest
Tests explosion and implosion of autocomplete tags.

Namespace

Drupal\Tests\Core\Common

Code

public function testImplodeTags() : void {
    $tags = array_values($this->validTags);
    // Let's explode and implode to our heart's content.
    for ($i = 0; $i < 10; $i++) {
        $string = Tags::implode($tags);
        $tags = Tags::explode($string);
    }
    $this->assertEquals(array_values($this->validTags), $tags);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.