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