Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
single_content_sync
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
single_content_sync
Commits
387fee94
Commit
387fee94
authored
1 year ago
by
Vadym Abramchuk
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3400982
: Add multi-valued string and string_long tests
parent
3c385464
No related branches found
No related tags found
1 merge request
!80
Resolve #3400982 "Field processor plugins"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/Kernel/FieldProcessor/SimpleFieldProcessorTest.php
+41
-0
41 additions, 0 deletions
tests/src/Kernel/FieldProcessor/SimpleFieldProcessorTest.php
with
41 additions
and
0 deletions
tests/src/Kernel/FieldProcessor/SimpleFieldProcessorTest.php
+
41
−
0
View file @
387fee94
...
...
@@ -2,6 +2,8 @@
namespace
Drupal\Tests\single_content_sync\Kernel\FieldProcessor
;
use
Drupal\Core\Field\FieldStorageDefinitionInterface
;
/**
* @coversDefaultClass \Drupal\single_content_sync\Plugin\SingleContentSyncFieldProcessor\SimpleField
*
...
...
@@ -24,6 +26,27 @@ class SimpleFieldProcessorTest extends FieldProcessorTestBase {
[
0
=>
[
'value'
=>
'hello'
]],
[
0
=>
[
'value'
=>
'hello'
]],
],
// Multivalued field test; there is just one for string since other field
// types share the same code/logic and there's no sense in testing them
// all.
'multivalued string'
=>
[
[
'type'
=>
'string'
,
'settings'
=>
[
'max_length'
=>
255
,
],
'cardinality'
=>
FieldStorageDefinitionInterface
::
CARDINALITY_UNLIMITED
,
],
[
0
=>
[
'value'
=>
'hello once'
],
1
=>
[
'value'
=>
'hello again'
]],
[
0
=>
[
'value'
=>
'hello once'
],
1
=>
[
'value'
=>
'hello again'
]],
],
'string_long'
=>
[
[
'type'
=>
'string_long'
,
],
[
0
=>
[
'value'
=>
'hello'
]],
[
0
=>
[
'value'
=>
'hello'
]],
],
];
}
...
...
@@ -42,6 +65,24 @@ class SimpleFieldProcessorTest extends FieldProcessorTestBase {
'hello'
,
[
0
=>
[
'value'
=>
'hello'
]],
],
'multivalued string'
=>
[
[
'type'
=>
'string'
,
'settings'
=>
[
'max_length'
=>
255
,
],
'cardinality'
=>
FieldStorageDefinitionInterface
::
CARDINALITY_UNLIMITED
,
],
[
0
=>
[
'value'
=>
'hello once'
],
1
=>
[
'value'
=>
'hello again'
]],
[
0
=>
[
'value'
=>
'hello once'
],
1
=>
[
'value'
=>
'hello again'
]],
],
'string_long'
=>
[
[
'type'
=>
'string_long'
,
],
'hello'
,
[
0
=>
[
'value'
=>
'hello'
]],
],
];
}
...
...
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