You are here

protected function ContextConditionContextEntityTaxonomyFieldTest::createContexts in Context entity field 7

Create context to test conditions.

1 call to ContextConditionContextEntityTaxonomyFieldTest::createContexts()
ContextConditionContextEntityTaxonomyFieldTest::setUp in tests/context_entity_field.test
Create required data to run tests.

File

tests/context_entity_field.test, line 356
Test context condition.

Class

ContextConditionContextEntityTaxonomyFieldTest
Test context contition using taxonomy field.

Code

protected function createContexts() {
  $this
    ->contextCreate('entity_term_field_empty', array(
    'entity_type' => array(
      'node',
    ),
    'field_name' => 'field_tags',
    'field_status' => 'empty',
    'field_value' => $this->terms['oranges']->tid,
  ));
  $this
    ->contextCreate('entity_term_field_all', array(
    'entity_type' => array(
      'node',
    ),
    'field_name' => 'field_tags',
    'field_status' => 'all',
    'field_value' => $this->terms['oranges']->tid,
  ));
  $this
    ->contextCreate('entity_term_field_match', array(
    'entity_type' => array(
      'node',
    ),
    'field_name' => 'field_tags',
    'field_status' => 'match',
    'field_value' => $this->terms['oranges']->tid,
  ));
}