$this->extension2 =
new UsageTrackingFormTypeExtension($this->calls,
['d' => 'd_default'
]);
$this->parentResolvedType =
new ResolvedFormType($this->parentType
);
$this->resolvedType =
new ResolvedFormType($this->type,
[$this->extension1,
$this->extension2
],
$this->parentResolvedType
);
$this->formFactory =
new FormFactory(new FormRegistry([],
new ResolvedFormTypeFactory()));
} public function testGetOptionsResolver() { $givenOptions =
['a' => 'a_custom', 'c' => 'c_custom', 'foo' => 'bar'
];
$resolvedOptions =
['a' => 'a_custom', 'b' => 'b_default', 'c' => 'c_custom', 'd' => 'd_default', 'foo' => 'bar'
];
$resolver =
$this->resolvedType->
getOptionsResolver();
$this->
assertEquals($resolvedOptions,
$resolver->
resolve($givenOptions));
} public function testCreateBuilder() { $givenOptions =
['a' => 'a_custom', 'c' => 'c_custom', 'foo' => 'bar'
];
$resolvedOptions =
['b' => 'b_default', 'd' => 'd_default', 'a' => 'a_custom', 'c' => 'c_custom', 'foo' => 'bar'
];
$builder =
$this->resolvedType->
createBuilder($this->formFactory, 'name',
$givenOptions);