Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
cb1248b3
Commit
cb1248b3
authored
Oct 12, 2012
by
webchick
Browse files
Issue
#1811648
by xjm: Remove SimpleTestTest dependency on the node frontpage.
parent
6d5b0fff
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php
View file @
cb1248b3
...
...
@@ -30,6 +30,13 @@ class SimpleTestTest extends WebTestBase {
*/
protected
$test_ids
=
array
();
/**
* The administrative user account to use during testing.
*
* @var Drupal\user\User
*/
protected
$admin_user
;
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'SimpleTest functionality'
,
...
...
@@ -41,9 +48,9 @@ public static function getInfo() {
function
setUp
()
{
if
(
!
$this
->
inCURL
())
{
parent
::
setUp
();
// Create and login user
$admin_user
=
$this
->
drupalCreateUser
(
array
(
'administer unit tests'
));
$this
->
drupalLogin
(
$admin_user
);
// Create and log
in an adm
in user
.
$
this
->
admin_user
=
$this
->
drupalCreateUser
(
array
(
'administer unit tests'
));
$this
->
drupalLogin
(
$
this
->
admin_user
);
}
else
{
self
::
$modules
=
array
(
'non_existent_module'
);
...
...
@@ -57,10 +64,15 @@ function setUp() {
function
testInternalBrowser
()
{
global
$conf
;
if
(
!
$this
->
inCURL
())
{
$this
->
drupalGet
(
'node'
);
// Retrieve the user page and check its title and headers.
$this
->
drupalGet
(
'user'
);
$this
->
assertTrue
(
$this
->
drupalGetHeader
(
'Date'
),
t
(
'An HTTP header was received.'
));
$this
->
assertTitle
(
t
(
'Welcome to @site-name | @site-name'
,
array
(
'@site-name'
=>
config
(
'system.site'
)
->
get
(
'name'
))),
t
(
'Site title matches.'
));
$this
->
assertNoTitle
(
'Foo'
,
t
(
'Site title does not match.'
));
$this
->
assertTitle
(
t
(
'@user | @site-name'
,
array
(
'@user'
=>
$this
->
admin_user
->
name
,
'@site-name'
=>
config
(
'system.site'
)
->
get
(
'name'
),
)));
$this
->
assertNoTitle
(
'Foo'
);
// Make sure that we are locked out of the installer when prefixing
// using the user-agent header. This is an important security check.
global
$base_url
;
...
...
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