diff --git a/core/modules/help_topics/tests/src/Kernel/HelpTopicKernelTest.php b/core/modules/help_topics/tests/src/Kernel/HtmlChunkerTest.php similarity index 77% rename from core/modules/help_topics/tests/src/Kernel/HelpTopicKernelTest.php rename to core/modules/help_topics/tests/src/Kernel/HtmlChunkerTest.php index 3fd40653ce..4ab215aa7d 100644 --- a/core/modules/help_topics/tests/src/Kernel/HelpTopicKernelTest.php +++ b/core/modules/help_topics/tests/src/Kernel/HtmlChunkerTest.php @@ -2,42 +2,20 @@ namespace Drupal\Tests\help_topics\Kernel; -use Drupal\Component\Utility\Html; -use Drupal\Core\Serialization\Yaml; use Drupal\KernelTests\KernelTestBase; use Drupal\help_topics\HtmlChunker; /** - * Tests some core functionality of the Help Topic entity. + * Tests the Drupal\help_topics\HtmlChunker class. * * @group help */ -class HelpTopicKernelTest extends KernelTestBase { +class HtmlChunkerTest extends KernelTestBase { /** - * Modules to enable. - * - * @var array + * Tests the HTML chunking functions. */ - public static $modules = [ - 'system', - 'help_topics', - 'help', - 'filter', - ]; - - /** - * {@inheritdoc} - */ - protected function setUp() { - parent::setUp(); - $this->installConfig(['help_topics']); - } - - /** - * Tests the help topic body get and set functions. - */ - public function testTopicBodyGetSet() { + public function testHtmlChunkJoin() { // Create a body value with lots of different HTML tags, some entities, and // some whitespace of various types between tags, and some text between // tags. @@ -63,7 +41,6 @@ public function testTopicBodyGetSet() { // Make sure that if we strip out tags, all remaining text is in the 'text' // parts of the chunked body array. $body_plain = strip_tags($body_expected); - $body_chunked = HtmlChunker::chunkHtml($body); $chunked_text = ''; foreach ($body_chunked as $item) { $prefix = strip_tags($item['prefix_tags']);