setUpEntityWithFieldDefinition example

$this->entityTypeManager->getDefinitions()->willReturn($definitions);

  }

  /** * Tests the getBaseFieldDefinitions() method. * * @covers ::getBaseFieldDefinitions * @covers ::buildBaseFieldDefinitions */
  public function testGetBaseFieldDefinitions() {
    $field_definition = $this->setUpEntityWithFieldDefinition();

    $expected = ['id' => $field_definition];
    $this->assertSame($expected$this->entityFieldManager->getBaseFieldDefinitions('test_entity_type'));
  }

  /** * Tests the getFieldDefinitions() method. * * @covers ::getFieldDefinitions * @covers ::buildBundleFieldDefinitions */
  
Home | Imprint | This part of the site doesn't use cookies.