protected function TermLevelFieldTest::buildLevelsValue in Term Level Field 8
Helper function to build levels value for the field settings.
Return value
string Key value pairs in format "key|value", one per line.
1 call to TermLevelFieldTest::buildLevelsValue()
- TermLevelFieldTest::testTermLevelField in tests/
src/ Functional/ TermLevelFieldTest.php - Tests the term level field.
File
- tests/
src/ Functional/ TermLevelFieldTest.php, line 86
Class
- TermLevelFieldTest
- Tests the functionality of Term level field type in BrowserTestBase tests.
Namespace
Drupal\Tests\term_level\FunctionalCode
protected function buildLevelsValue() {
$value = [];
foreach ($this->levels as $level_key => $level_value) {
$value[] = $level_key . '|' . $level_value;
}
return implode("\n", $value);
}