Version 1
[yaffs-website] / web / modules / contrib / admin_toolbar / admin_toolbar_tools / src / Tests / AdminToolbarToolsAlterTest.php
diff --git a/web/modules/contrib/admin_toolbar/admin_toolbar_tools/src/Tests/AdminToolbarToolsAlterTest.php b/web/modules/contrib/admin_toolbar/admin_toolbar_tools/src/Tests/AdminToolbarToolsAlterTest.php
new file mode 100644 (file)
index 0000000..ba074d9
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+
+namespace Drupal\admin_toolbar_tools\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests for the existence of Admin Toolbar tools new links.
+ *
+ * @group admin_toolbar
+ */
+class AdminToolbarToolsAlterTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['toolbar', 'admin_toolbar', 'admin_toolbar_tools'];
+
+  /**
+   * A test user with permission to access the administrative toolbar.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    // Create and log in an administrative user.
+    $this->adminUser = $this->drupalCreateUser([
+      'access toolbar',
+      'access administration pages',
+    ]);
+    $this->drupalLogin($this->adminUser);
+  }
+
+  /**
+   * Tests for the hover of sub menus.
+   */
+  public function testAdminToolbarTools() {
+    // Assert that special menu items are present in the HTML.
+    $this->assertRaw('class="toolbar-icon toolbar-icon-admin-toolbar-tools-flush"');
+  }
+
+}