Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
user_history-3290284
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
user_history-3290284
Commits
618cbedb
Commit
618cbedb
authored
3 years ago
by
James Scott
Browse files
Options
Downloads
Patches
Plain Diff
Initial test
parent
9368579f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/Functional/LoadFrontPageTest.php
+21
-5
21 additions, 5 deletions
tests/src/Functional/LoadFrontPageTest.php
with
21 additions
and
5 deletions
tests/src/Functional/LoadTest.php
→
tests/src/Functional/Load
FrontPage
Test.php
+
21
−
5
View file @
618cbedb
...
...
@@ -10,14 +10,18 @@ use Drupal\Tests\BrowserTestBase;
*
* @group user_history
*/
class
LoadTest
extends
BrowserTestBase
{
class
Load
FrontPage
Test
extends
BrowserTestBase
{
/**
* Modules to enable.
*
* @var array
*/
public
static
$modules
=
[
'user_history'
];
public
static
$modules
=
[
'user_history'
,
'node'
,
'views'
,
];
/**
* A user with permission to administer site configuration.
...
...
@@ -26,21 +30,33 @@ class LoadTest extends BrowserTestBase {
*/
protected
$user
;
/**
* The default theme to use with the test
* @var string
*/
protected
$defaultTheme
=
'stark'
;
/**
* {@inheritdoc}
*/
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
user
=
$this
->
drupalCreateUser
([
'administer site configuration'
]);
$this
->
drupalLogin
(
$this
->
user
);
// Set the front page to "/node".
\Drupal
::
configFactory
()
->
getEditable
(
'system.site'
)
->
set
(
'page.front'
,
'/node'
)
->
save
(
TRUE
);
}
/**
* Tests that the home page loads with a 200 response.
*/
public
function
testLoad
()
{
public
function
testLoad
FrontPage
()
{
$this
->
drupalGet
(
Url
::
fromRoute
(
'<front>'
));
// Confirm that the page loaded correctly
$this
->
assertSession
()
->
statusCodeEquals
(
200
);
// Confirm that the front page contains the standard text.
$this
->
assertText
(
'Welcome to Drupal'
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment