function HelpTopicTest::getTopicList

Same name in other branches
  1. 9 core/modules/help_topics/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help_topics\Functional\HelpTopicTest::getTopicList()
  2. 8.9.x core/modules/help_topics/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help_topics\Functional\HelpTopicTest::getTopicList()
  3. 11.x core/modules/help/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help\Functional\HelpTopicTest::getTopicList()

Gets a list of topic IDs to test.

Return value

array A list of topics to test, in the order in which they should appear. The keys are the machine names of the topics. The values are arrays with the following elements:

  • name: Displayed name.
  • tags: Cache tags to test for.
2 calls to HelpTopicTest::getTopicList()
HelpTopicTest::testHelp in core/modules/help/tests/src/Functional/HelpTopicTest.php
Tests the main help page and individual pages for topics.
HelpTopicTest::verifyHelp in core/modules/help/tests/src/Functional/HelpTopicTest.php
Verifies the logged in user has access to various help links and pages.

File

core/modules/help/tests/src/Functional/HelpTopicTest.php, line 255

Class

HelpTopicTest
Verifies help topic display and user access to help based on permissions.

Namespace

Drupal\Tests\help\Functional

Code

protected function getTopicList() {
    return [
        'help_topics_test.test' => [
            'name' => 'ABC Help Test module',
            'tags' => [
                'core.extension',
            ],
        ],
        'help_topics_derivatives:test_derived_topic' => [
            'name' => 'Label for test_derived_topic',
            'tags' => [
                'foobar',
            ],
        ],
        'help_topics_test_direct_yml' => [
            'name' => 'Test direct yaml topic label',
            'tags' => [
                'foobar',
            ],
        ],
    ];
}

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