protected function ContextConditionContextEntityNoFieldTest::createContexts in Context entity field 7
Create context to test conditions.
1 call to ContextConditionContextEntityNoFieldTest::createContexts()
- ContextConditionContextEntityNoFieldTest::setUp in tests/
context_entity_field.test  - Create required data to run tests.
 
File
- tests/
context_entity_field.test, line 483  - Test context condition.
 
Class
- ContextConditionContextEntityNoFieldTest
 - Test context contition to entity without field.
 
Code
protected function createContexts() {
  $this
    ->contextCreate('entity_missing_field_empty', array(
    'entity_type' => array(
      'node',
    ),
    'field_name' => 'missing',
    'field_status' => 'empty',
    'field_value' => '',
  ));
  $this
    ->contextCreate('entity_missing_field_all', array(
    'entity_type' => array(
      'node',
    ),
    'field_name' => 'missing',
    'field_status' => 'all',
    'field_value' => 'other',
  ));
  $this
    ->contextCreate('entity_missing_field_match', array(
    'entity_type' => array(
      'node',
    ),
    'field_name' => 'missing',
    'field_status' => 'match',
    'field_value' => 'test',
  ));
}