Drupal\system\Tests\Theme\FastTest does not test anything

Created on 20 August 2016, almost 8 years ago
Updated 8 February 2023, over 1 year ago

Problem/Motivation

/**
 * Tests access to user autocompletion and verify the correct results.
 */
function testUserAutocomplete() {
  $this->drupalLogin($this->account);
  $this->drupalGet('user/autocomplete', array('query' => array('q' => $this->account->getUsername())));
  $this->assertRaw($this->account->getUsername());
  $this->assertNoText('registry initialized', 'The registry was not initialized');
}

The path user/autocomplete does not exist in Drupal 8 for a long time. The test still passes because user/autocomplete is found in drupalSettings.path.currentQuery.

Steps to reproduce

Proposed resolution

Search for all remaining usages of the route or string and decide what to do with each one.

Remaining tasks

Patch
Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs work

Version

10.1

Component
System 

Last updated 2 days ago

No maintainer
Created by

🇷🇺Russia Chi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    Needs a reroll but appears to be dead code maybe?

  • 🇮🇳India _utsavsharma

    Rerolled for 10.1.x.

  • Status changed to RTBC over 1 year ago
  • 🇺🇸United States smustgrave

    Pretty convinced this is deadcode but will see what the committers say.

  • Status changed to Needs work over 1 year ago
  • 🇳🇿New Zealand quietone New Zealand

    The route 'user.autocomplete' was removed in Drupal 8.0.x #2434697: Remove UserAutocompleteController .

    There is another instance of the string 'user/autocomplete'. That should be investigated here as well.

    $ git grep 'user.autocomplete' | grep -v drupal[6-7].php
    core/modules/node/tests/src/Functional/NodeCreationTest.php:    $this->assertSession()->elementNotExists('xpath', '//input[@id="edit-uid-0-value" and contains(@data-autocomplete-path, "user/autocomplete")]');
    core/modules/system/tests/src/Functional/Theme/FastTest.php:    $this->drupalGet('user/autocomplete', ['query' => ['q' => $this->account->getAccountName()]]);
    
Production build 0.69.0 2024