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
Commits
e1be57d7
Commit
e1be57d7
authored
3 weeks ago
by
lysenko
Committed by
igor mashevskyi
3 weeks ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3500208
parent
b7ed3ba3
No related branches found
No related tags found
1 merge request
!73
Issue #3500208
Pipeline
#405841
passed with warnings
3 weeks ago
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/Unit/Filters/MachineNameFilterTest.php
+44
-0
44 additions, 0 deletions
tests/src/Unit/Filters/MachineNameFilterTest.php
with
44 additions
and
0 deletions
tests/src/Unit/Filters/MachineNameFilterTest.php
0 → 100644
+
44
−
0
View file @
e1be57d7
<?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'
));
}
}
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