function HelpTopicSearchTest::assertSearchResultsCount

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

Asserts that help search returned the expected number of results.

@internal

Parameters

int $count: The expected number of search results.

2 calls to HelpTopicSearchTest::assertSearchResultsCount()
HelpTopicSearchTest::setUp in core/modules/help/tests/src/Functional/HelpTopicSearchTest.php
HelpTopicSearchTest::testHelpSearch in core/modules/help/tests/src/Functional/HelpTopicSearchTest.php
Tests help topic search.

File

core/modules/help/tests/src/Functional/HelpTopicSearchTest.php, line 308

Class

HelpTopicSearchTest
Verifies help topic search.

Namespace

Drupal\Tests\help\Functional

Code

protected function assertSearchResultsCount(int $count) : void {
    $this->assertSession()
        ->elementsCount('css', '.help_search-results > li', $count);
}

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