ba074d9b5b5e4b0a267ae04f0be1c44c6fa0ad15
[yaffs-website] / web / modules / contrib / admin_toolbar / admin_toolbar_tools / src / Tests / AdminToolbarToolsAlterTest.php
1 <?php
2
3 namespace Drupal\admin_toolbar_tools\Tests;
4
5 use Drupal\simpletest\WebTestBase;
6
7 /**
8  * Tests for the existence of Admin Toolbar tools new links.
9  *
10  * @group admin_toolbar
11  */
12 class AdminToolbarToolsAlterTest extends WebTestBase {
13
14   /**
15    * Modules to enable.
16    *
17    * @var array
18    */
19   public static $modules = ['toolbar', 'admin_toolbar', 'admin_toolbar_tools'];
20
21   /**
22    * A test user with permission to access the administrative toolbar.
23    *
24    * @var \Drupal\user\UserInterface
25    */
26   protected $adminUser;
27
28   /**
29    * {@inheritdoc}
30    */
31   protected function setUp() {
32     parent::setUp();
33     // Create and log in an administrative user.
34     $this->adminUser = $this->drupalCreateUser([
35       'access toolbar',
36       'access administration pages',
37     ]);
38     $this->drupalLogin($this->adminUser);
39   }
40
41   /**
42    * Tests for the hover of sub menus.
43    */
44   public function testAdminToolbarTools() {
45     // Assert that special menu items are present in the HTML.
46     $this->assertRaw('class="toolbar-icon toolbar-icon-admin-toolbar-tools-flush"');
47   }
48
49 }