OverridesSectionStorage example

$this->entityTypeManager = $this->prophesize(EntityTypeManagerInterface::class);
    $this->entityFieldManager = $this->prophesize(EntityFieldManagerInterface::class);
    $section_storage_manager = $this->prophesize(SectionStorageManagerInterface::class);
    $this->entityRepository = $this->prophesize(EntityRepositoryInterface::class);
    $account = $this->prophesize(AccountInterface::class);

    $definition = new SectionStorageDefinition([
      'id' => 'overrides',
      'class' => OverridesSectionStorage::class,
    ]);
    $this->plugin = new OverridesSectionStorage([], 'overrides', $definition$this->entityTypeManager->reveal()$this->entityFieldManager->reveal()$section_storage_manager->reveal()$this->entityRepository->reveal()$account->reveal());
  }

  /** * @covers ::extractEntityFromRoute * * @dataProvider providerTestExtractEntityFromRoute * * @param bool $success * Whether a successful result is expected. * @param string|null $expected_entity_type_id * The expected entity type ID. * @param string $value * The value to pass to ::extractEntityFromRoute(). * @param array $defaults * The defaults to pass to ::extractEntityFromRoute(). */
Home | Imprint | This part of the site doesn't use cookies.