You are here

protected function IntegrationTest::checkSlashSearch in Search API Pages 8

Regression test for #2721619.

1 call to IntegrationTest::checkSlashSearch()
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 179

Class

IntegrationTest
Provides web tests for Search API Pages.

Namespace

Drupal\Tests\search_api_page\Functional

Code

protected function checkSlashSearch() {
  $this
    ->drupalCreateNode([
    'title' => 'Another article',
    'type' => 'article',
    'body' => [
      [
        'value' => 'foo/bar/qux fubar',
      ],
    ],
  ]);
  $this
    ->indexItems($this->index
    ->id());
  $assert_session = $this
    ->assertSession();
  $this
    ->drupalGet('/search');
  $assert_session
    ->statusCodeEquals(200);
  $this
    ->drupalPostForm(NULL, [
    'keys' => 'foo/bar',
  ], 'Search');
  $assert_session
    ->statusCodeEquals(200);
  $assert_session
    ->pageTextContains('1 result found');
}