protected function ConditionalFieldTestBase::createCondition in Conditional Fields 8
Same name and namespace in other branches
- 4.x tests/src/FunctionalJavascript/ConditionalFieldTestBase.php \Drupal\Tests\conditional_fields\FunctionalJavascript\ConditionalFieldTestBase::createCondition()
Create basic fields' dependency.
Parameters
string $dependent: Machine name of dependent field.
string $dependee: Machine name of dependee field.
string $state: Dependent field state.
string $condition: Condition value.
117 calls to ConditionalFieldTestBase::createCondition()
- ConditionalFieldCheckboxesTest::testVisibleValueAnd in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - The target field is Visible when the control field has value with AND condition.
- ConditionalFieldCheckboxesTest::testVisibleValueNot in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - The target field is Visible when the control field has value with NOT condition.
- ConditionalFieldCheckboxesTest::testVisibleValueOr in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - The target field is Visible when the control field has value with OR condition.
- ConditionalFieldCheckboxesTest::testVisibleValueRegExp in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - The target field is Visible when the control field has value from Regular expression.
- ConditionalFieldCheckboxesTest::testVisibleValueWidget in tests/
src/ FunctionalJavascript/ ConditionalFieldCheckboxesTest.php - The target field is Visible when the control field has value from Widget.
File
- tests/
src/ FunctionalJavascript/ ConditionalFieldTestBase.php, line 118
Class
- ConditionalFieldTestBase
- Base setup for ConditionalField tests.
Namespace
Drupal\Tests\conditional_fields\FunctionalJavascriptCode
protected function createCondition($dependent, $dependee, $state, $condition) {
$edit = [
'table[add_new_dependency][dependent][]' => $dependent,
'table[add_new_dependency][dependee]' => $dependee,
'table[add_new_dependency][state]' => $state,
'table[add_new_dependency][condition]' => $condition,
];
$this
->submitForm($edit, 'Add dependency');
//the Status code not supported on WebDriverTestBase since 8.4 core. See more information on See https://www.drupal.org/node/2857562
}