Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
config_partial_export
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
config_partial_export
Merge requests
!3
Issue
#3336401
: Create tests for basic module functionalities
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#3336401
: Create tests for basic module functionalities
issue/config_partial_export-3336401:3336401-create-tests-for
into
8.x-1.x
Overview
0
Commits
2
Pipelines
0
Changes
1
Open
Elber Rodrigues
requested to merge
issue/config_partial_export-3336401:3336401-create-tests-for
into
8.x-1.x
2 years ago
Overview
0
Commits
2
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
8.x-1.x
version 1
d084cd7f
2 years ago
8.x-1.x (HEAD)
and
latest version
latest version
b1a5804e
2 commits,
2 years ago
version 1
d084cd7f
1 commit,
2 years ago
1 file
+
54
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
tests/src/Functional/ConfigPartialExportTest.php
0 → 100644
+
54
−
0
Options
<?php
namespace
Drupal\Tests\config_partial_export\Functional
;
use
Drupal\Tests\BrowserTestBase
;
/**
* Class to functional tests in config partial export module.
*/
class
ConfigPartialExportTest
extends
BrowserTestBase
{
/**
* Administrative User.
*
* @var \Drupal\Core\Session\AccountInterface
*/
protected
$adminUser
;
/**
* {@inheritDoc}
*/
protected
$defaultTheme
=
'stark'
;
/**
* {@inheritDoc}
*/
protected
static
$modules
=
[
'config'
,
];
/**
* {@inheritDoc}
*/
protected
function
setUp
():
void
{
parent
::
setUp
();
$this
->
adminUser
=
$this
->
drupalCreateUser
([],
'user'
,
TRUE
);
}
/**
* Test if the module has been installed and uninstalled correctly.
*/
public
function
testInstallAndUninstall
()
{
$this
->
drupalLogin
(
$this
->
adminUser
);
$this
->
drupalGet
(
'admin/modules'
);
$this
->
submitForm
([
"modules[config_partial_export][enable]"
=>
TRUE
],
'Install'
);
$this
->
assertSession
()
->
pageTextContains
(
'Module Configuration Partial Export has been enabled.'
);
// Uninstall the module.
$this
->
drupalGet
(
'admin/modules/uninstall'
);
$this
->
submitForm
([
"uninstall[config_partial_export]"
=>
TRUE
],
'Uninstall'
);
$this
->
submitForm
([],
'Uninstall'
);
$this
->
assertSession
()
->
pageTextContains
(
'The selected modules have been uninstalled.'
);
}
}
Loading