protected function EntityFieldQueryViewsTestBase::saveFieldsEntities in EntityFieldQuery Views Backend 8
2 calls to EntityFieldQueryViewsTestBase::saveFieldsEntities()
- EntityFieldQueryViewsTermTest::setUp in src/
Tests/ EntityFieldQueryViewsTermTest.php - Sets up a Drupal site for running functional and integration tests.
- EntityFieldQueryViewsTestBase::setUp in src/
Tests/ EntityFieldQueryViewsTestBase.php - Sets up a Drupal site for running functional and integration tests.
File
- src/
Tests/ EntityFieldQueryViewsTestBase.php, line 55 - Tests for EFQ Views query features.
Class
- EntityFieldQueryViewsTestBase
- Abstract class for EFQ views testing.
Namespace
Drupal\efq_views\TestsCode
protected function saveFieldsEntities() {
foreach ($this->fields as $field) {
field_create_field($field);
}
foreach ($this->instances as $instance) {
field_create_instance($instance);
}
// Load the test dataset.
foreach ($this->entities_array as $key => $entity_array) {
$entity = entity_create('efq_views_test', $entity_array);
entity_save('efq_views_test', $entity);
$this
->assertFalse(empty($entity->eid), 'Entity saved');
$this->entities[$key] = $entity;
}
}