function FastTest::testUserAutocomplete

Same name in other branches
  1. 8.9.x core/modules/system/tests/src/Functional/Theme/FastTest.php \Drupal\Tests\system\Functional\Theme\FastTest::testUserAutocomplete()
  2. 10 core/modules/system/tests/src/Functional/Theme/FastTest.php \Drupal\Tests\system\Functional\Theme\FastTest::testUserAutocomplete()
  3. 11.x 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 44

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');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.