HiddenType example

return [
            new Type\FormType($this->propertyAccessor),
            new Type\BirthdayType(),
            new Type\CheckboxType(),
            new Type\ChoiceType($this->choiceListFactory, $this->translator),
            new Type\CollectionType(),
            new Type\CountryType(),
            new Type\DateIntervalType(),
            new Type\DateType(),
            new Type\DateTimeType(),
            new Type\EmailType(),
            new Type\HiddenType(),
            new Type\IntegerType(),
            new Type\LanguageType(),
            new Type\LocaleType(),
            new Type\MoneyType(),
            new Type\NumberType(),
            new Type\PasswordType(),
            new Type\PercentType(),
            new Type\RadioType(),
            new Type\RangeType(),
            new Type\RepeatedType(),
            new Type\SearchType(),
            
private FormDataExtractor $dataExtractor;

    protected function setUp(): void
    {
        $this->dataExtractor = new FormDataExtractor();
    }

    public function testExtractConfiguration()
    {
        $form = $this->createBuilder('name')
            ->setType(new ResolvedFormType(new HiddenType()))
            ->getForm();

        $this->assertSame([
            'id' => 'name',
            'name' => 'name',
            'type_class' => HiddenType::class,
            'synchronized' => true,
            'passed_options' => [],
            'resolved_options' => [],
        ]$this->dataExtractor->extractConfiguration($form));
    }

    
Home | Imprint | This part of the site doesn't use cookies.