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. 10 core/modules/help/tests/src/Functional/HelpTopicSearchTest.php \Drupal\Tests\help\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.

Parameters

int $count: The expected number of search results.

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

File

core/modules/help_topics/tests/src/Functional/HelpTopicSearchTest.php, line 262

Class

HelpTopicSearchTest
Verifies help topic search.

Namespace

Drupal\Tests\help_topics\Functional

Code

protected function assertSearchResultsCount($count) {
    $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.