You are here

public function FastTest::testUserAutocomplete in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Theme/FastTest.php \Drupal\Tests\system\Functional\Theme\FastTest::testUserAutocomplete()

Tests access to user autocompletion and verify the correct results.

File

core/modules/system/tests/src/Functional/Theme/FastTest.php, line 34

Class

FastTest
Tests autocompletion not loading registry.

Namespace

Drupal\Tests\system\Functional\Theme

Code

public function testUserAutocomplete() {
  $this
    ->drupalLogin($this->account);
  $this
    ->drupalGet('user/autocomplete', [
    'query' => [
      'q' => $this->account
        ->getAccountName(),
    ],
  ]);
  $this
    ->assertSession()
    ->responseContains($this->account
    ->getAccountName());
  $this
    ->assertSession()
    ->pageTextNotContains('registry initialized');
}