You are here

protected function GeofieldFormatterTest::setUp in Geofield 8

Overrides EntityKernelTestBase::setUp

File

tests/src/Kernel/GeofieldFormatterTest.php, line 41

Class

GeofieldFormatterTest
Tests the geofield formatters functionality.

Namespace

Drupal\Tests\geofield\Kernel

Code

protected function setUp() {
  parent::setUp();
  FieldStorageConfig::create([
    'field_name' => 'geofield',
    'entity_type' => $this->entityType,
    'type' => 'geofield',
    'settings' => [
      'backend' => 'geofield_backend_default',
    ],
  ])
    ->save();
  FieldConfig::create([
    'entity_type' => $this->entityType,
    'bundle' => $this->bundle,
    'field_name' => 'geofield',
    'label' => 'GeoField',
    'settings' => [
      'backend' => 'geofield_backend_default',
    ],
  ])
    ->save();
}