| 1 theme.test | ThemeFastTestCase::testUserAutocomplete() |
Tests access to user autocompletion and verify the correct results.
File
- core/
modules/ simpletest/ tests/ theme.test, line 563 - Tests for the theme API.
Class
- ThemeFastTestCase
- Tests autocompletion not loading registry.
Code
function testUserAutocomplete() {
$this->backdropLogin($this->account);
// Get a valid autocomplete token from a form with a user autocomplete field.
$this->backdropGet('form-test/autocomplete');
$elements = $this->xpath('//input[@id="edit-user-textfield-autocomplete"]');
$token = (string) $elements[0]['data-autocomplete-token'];
$this->backdropGet('user/autocomplete/' . $this->account->name, array(
'query' => array('token' => $token),
));
$this->assertText('registry not initialized', 'The registry was not initialized');
}