protected function ContextConditionContextEntityTextFieldTest::createContexts in Context entity field 7
Create context to test conditions.
1 call to ContextConditionContextEntityTextFieldTest::createContexts()
- ContextConditionContextEntityTextFieldTest::setUp in tests/
context_entity_field.test - Create required data to run tests.
File
- tests/
context_entity_field.test, line 122 - Test context condition.
Class
- ContextConditionContextEntityTextFieldTest
- Test context contition using text field.
Code
protected function createContexts() {
$this
->contextCreate('entity_text_field_empty', array(
'entity_type' => array(
'node',
),
'field_name' => 'body',
'field_status' => 'empty',
'field_value' => '',
));
$this
->contextCreate('entity_text_field_all', array(
'entity_type' => array(
'node',
),
'field_name' => 'body',
'field_status' => 'all',
'field_value' => 'other',
));
$this
->contextCreate('entity_text_field_match', array(
'entity_type' => array(
'node',
),
'field_name' => 'body',
'field_status' => 'match',
'field_value' => 'test',
));
}