Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fapi_validation
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
fapi_validation
Merge requests
!73
Issue
#3500208
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3500208
issue/fapi_validation-3502200:3502200-create-a-new
into
3.0.x
Overview
0
Commits
3
Pipelines
4
Changes
1
Merged
lysenko
requested to merge
issue/fapi_validation-3502200:3502200-create-a-new
into
3.0.x
2 months ago
Overview
0
Commits
3
Pipelines
4
Changes
1
Expand
Added test for test functionality of the filter
machine_name
.
Related to
#3502200
0
0
Merge request reports
Compare
3.0.x
version 2
9d89bd5c
2 months ago
version 1
f2c9ad7f
2 months ago
3.0.x (base)
and
latest version
latest version
277ea4c3
3 commits,
2 months ago
version 2
9d89bd5c
2 commits,
2 months ago
version 1
f2c9ad7f
1 commit,
2 months ago
1 file
+
44
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
tests/src/Unit/Filters/MachineNameFilterTest.php
0 → 100644
+
44
−
0
Options
<?php
namespace
Drupal\Tests\fapi_validation\Unit\Filters
;
use
Drupal\fapi_validation
\FapiValidationFiltersManager
;
use
Drupal\KernelTests\KernelTestBase
;
/**
* Tests filter MachineNameFilterTest.
*
* @group fapi_validation
* @group fapi_validation_filters
*/
class
MachineNameFilterTest
extends
KernelTestBase
{
/**
* {@inheritdoc}
*/
protected
static
$modules
=
[
'fapi_validation'
];
/**
* The filter plugin manager.
*
* @var \Drupal\fapi_validation\FapiValidationFiltersManager
*/
protected
FapiValidationFiltersManager
$fapiValidationFiltersManager
;
/**
* {@inheritdoc}
*/
protected
function
setUp
():
void
{
parent
::
setUp
();
$this
->
fapiValidationFiltersManager
=
$this
->
container
->
get
(
'plugin.manager.fapi_validation_filters'
);
}
/**
* Testing machine_name`s filter plugin.
*/
public
function
testValidString
()
:
void
{
$plugin
=
$this
->
fapiValidationFiltersManager
->
createInstance
(
'machine_name'
);
$this
->
assertEquals
(
'test_test'
,
$plugin
->
filter
(
'TesT test'
));
}
}
Loading