Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
A
admin_toolbar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
admin_toolbar
Commits
48e5a8c0
Commit
48e5a8c0
authored
Dec 08, 2015
by
chegor
Committed by
eme
Dec 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2613378
by chegor: Add basic test
parent
eda63b1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
src/Tests/AdminToolbarAlterTest.php
src/Tests/AdminToolbarAlterTest.php
+58
-0
No files found.
src/Tests/AdminToolbarAlterTest.php
0 → 100644
View file @
48e5a8c0
<?php
/**
* @file
* Contains \Drupal\admin_toolbar\Tests\AdminToolbarAlterTest.
*/
namespace
Drupal\admin_toolbar\Tests
;
use
Drupal\simpletest\WebTestBase
;
/**
* Test the existence of Admin Toolbar module.
*
* @group admin_toolbar
*/
class
AdminToolbarAlterTest
extends
WebTestBase
{
/**
* A user with permission to access the administrative toolbar.
*
* @var \Drupal\user\UserInterface
*/
protected
$adminUser
;
/**
* Modules to enable.
*
* @var array
*/
public
static
$modules
=
array
(
'toolbar'
,
'admin_toolbar'
,
'admin_toolbar_tools'
);
protected
function
setUp
()
{
parent
::
setUp
();
// Create an administrative user and log it in.
$this
->
adminUser
=
$this
->
drupalCreateUser
(
array
(
'access toolbar'
));
$this
->
drupalLogin
(
$this
->
adminUser
);
}
/**
* Tests for a the hover of sub menus.
*/
function
testAdminToolbar
()
{
// Get the front page.
$this
->
drupalGet
(
'<front>'
);
$this
->
assertResponse
(
200
);
// Assert that expanded links are present in HTML.
// Test with the uninstall link that must be there whatever modules exists.
$this
->
assertRaw
(
'id="toolbar-link-system-modules_uninstall"'
);
// Test for admin_toolbar_tools if special menu items are added.
$this
->
assertRaw
(
'id="toolbar-link-admin_toolbar_tools-flush"'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment