DefaultsSectionStorage example

protected function setUp(): void {
    parent::setUp();

    $this->entityTypeManager = $this->prophesize(EntityTypeManagerInterface::class);
    $entity_type_bundle_info = $this->prophesize(EntityTypeBundleInfoInterface::class);
    $this->sampleEntityGenerator = $this->prophesize(SampleEntityGeneratorInterface::class);

    $definition = new SectionStorageDefinition([
      'id' => 'defaults',
      'class' => DefaultsSectionStorage::class,
    ]);
    $this->plugin = new DefaultsSectionStorage([], '', $definition$this->entityTypeManager->reveal()$entity_type_bundle_info->reveal()$this->sampleEntityGenerator->reveal());
  }

  /** * @covers ::getThirdPartySetting * @covers ::setThirdPartySetting */
  public function testThirdPartySettings() {
    $this->entityTypeManager->getDefinition('entity_view_display')->willReturn(new EntityType(['id' => 'entity_view_display']));

    $container = new ContainerBuilder();
    $container->set('typed_data_manager', $this->prophesize(TypedDataManagerInterface::class)->reveal());
    
Home | Imprint | This part of the site doesn't use cookies.