Version 1
[yaffs-website] / web / core / modules / system / tests / src / Functional / Theme / FastTest.php
diff --git a/web/core/modules/system/tests/src/Functional/Theme/FastTest.php b/web/core/modules/system/tests/src/Functional/Theme/FastTest.php
new file mode 100644 (file)
index 0000000..d8f85f1
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\system\Functional\Theme;
+
+use Drupal\Tests\BrowserTestBase;
+
+/**
+ * Tests autocompletion not loading registry.
+ *
+ * @group Theme
+ */
+class FastTest extends BrowserTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['theme_test'];
+
+  protected function setUp() {
+    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->getUsername()]]);
+    $this->assertRaw($this->account->getUsername());
+    $this->assertNoText('registry initialized', 'The registry was not initialized');
+  }
+
+}