public function DazzlerTest::providerRepeatedPreRenderFormCalls in Formdazzle! 2.x
Data provider for testRepeatedPreRenderFormCalls().
See also
testRepeatedPreRenderFormCalls()
File
- tests/
src/ Unit/ DazzlerTest.php, line 338
Class
- DazzlerTest
- @coversDefaultClass \Drupal\formdazzle\Dazzler @group formdazzle
Namespace
Drupal\Tests\formdazzle\UnitCode
public function providerRepeatedPreRenderFormCalls() {
$data = [];
// Node edit form.
$form = $this
->getFixture('with_child');
Dazzler::formAlter($form, 'with_child');
$expected = $form + [
'#theme_wrappers' => [
'form__with_child',
],
'#markup' => $this
->getTwigDebugComment([
'with-child.html.twig',
]),
];
$expected['child'] = [
'#type' => 'with_theme_and_wrappers',
'#theme' => 'with_theme__with_child',
'#theme_wrappers' => [
'with_theme_wrapper__with_child',
],
];
unset($expected['#formdazzle']);
$data['no duplicated suggestion parts (issue #3182297)'] = [
$form,
$expected,
];
return $data;
}