Sets up the test.
Overrides FieldUnitTestBase::setUp
public function setUp() {
parent::setUp();
$this
->installSchema('taxonomy', 'taxonomy_term_data');
$this
->installSchema('taxonomy', 'taxonomy_term_hierarchy');
$vocabulary = entity_create('taxonomy_vocabulary', array(
'name' => $this
->randomName(),
'vid' => drupal_strtolower($this
->randomName()),
'langcode' => Language::LANGCODE_NOT_SPECIFIED,
));
$vocabulary
->save();
$this->term = entity_create('taxonomy_term', array(
'name' => $this
->randomName(),
'vid' => $vocabulary
->id(),
'langcode' => Language::LANGCODE_NOT_SPECIFIED,
));
$this->term
->save();
// Use the util to create an instance.
entity_reference_create_instance('entity_test', 'entity_test', 'field_test_taxonomy', 'Test entity reference', 'taxonomy_term');
}