class FastTest
Same name and namespace in other branches
- 10 core/modules/system/tests/src/Functional/Theme/FastTest.php \Drupal\Tests\system\Functional\Theme\FastTest
- 8.9.x core/modules/system/tests/src/Functional/Theme/FastTest.php \Drupal\Tests\system\Functional\Theme\FastTest
Tests autocompletion not loading registry.
@group Theme
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\system\Functional\Theme\FastTest extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of FastTest
File
-
core/
modules/ system/ tests/ src/ Functional/ Theme/ FastTest.php, line 12
Namespace
Drupal\Tests\system\Functional\ThemeView source
class FastTest extends BrowserTestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'theme_test',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* User allowed to access use profiles.
*
* @var \Drupal\user\Entity\User
*/
protected $account;
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->account = $this->drupalCreateUser([
'access user profiles',
]);
}
/**
* Tests access to user autocompletion and verify the correct results.
*/
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.