You are here

protected function HelpTopicSearchTest::assertSearchResultsCount in Drupal 8

Same name and namespace 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_topics/tests/src/Functional/HelpTopicSearchTest.php \Drupal\Tests\help_topics\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);
}