You are here

protected function IntegrationTest::checkMultipleWordSearch in Search API Pages 8

Regression test for 2949069.

1 call to IntegrationTest::checkMultipleWordSearch()
IntegrationTest::testFramework in tests/src/Functional/IntegrationTest.php
Sets up an environment for testing + delegates to other methods for tests.

File

tests/src/Functional/IntegrationTest.php, line 141

Class

IntegrationTest
Provides web tests for Search API Pages.

Namespace

Drupal\Tests\search_api_page\Functional

Code

protected function checkMultipleWordSearch() {
  $assert_session = $this
    ->assertSession();
  $this
    ->drupalGet('/search');
  $assert_session
    ->statusCodeEquals(200);
  $this
    ->drupalPostForm(NULL, [
    'keys' => 'Owls',
  ], 'Search');
  $assert_session
    ->statusCodeEquals(200);
  $assert_session
    ->pageTextContains('9 results found');
  $this
    ->drupalPostForm(NULL, [
    'keys' => 'birds of prey',
  ], 'Search');
  $assert_session
    ->statusCodeEquals(200);
  $assert_session
    ->pageTextContains('9 results found');
  $this
    ->drupalPostForm(NULL, [
    'keys' => 'prey birds',
  ], 'Search');
  $assert_session
    ->statusCodeEquals(200);
  $assert_session
    ->pageTextContains('9 results found');
}