You are here

protected function IntegrationTest::checkSpacesInSearch in Search API Pages 8

Regression test for 2904203.

File

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

Class

IntegrationTest
Provides web tests for Search API Pages.

Namespace

Drupal\Tests\search_api_page\Functional

Code

protected function checkSpacesInSearch() {
  $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' => ' Owls',
  ], 'Search');
  $assert_session
    ->statusCodeEquals(200);
  $assert_session
    ->pageTextContains('9 results found');
}