EntityField example

/** * @covers ::__construct */
  public function testConstruct() {
    $definition = [
      'entity_type' => 'test_entity',
      // Just provide 'entity field' as definition. This is how EntityViewsData       // provides it.       'entity field' => 'title',
    ];
    $handler = new EntityField([], 'field', $definition$this->entityTypeManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer, $this->entityRepository, $this->entityFieldManager);

    $this->assertEquals('title', $handler->definition['field_name']);
  }

  /** * @covers ::defineOptions */
  public function testDefineOptionsWithNoOptions() {
    $definition = [
      'entity_type' => 'test_entity',
      'field_name' => 'title',
    ];
Home | Imprint | This part of the site doesn't use cookies.