@@ 54-69 (lines=16) @@ | ||
51 | $this->assertSame(ButtonType::class, $this->extension->getExtendedType()); |
|
52 | } |
|
53 | ||
54 | public function testDefault() |
|
55 | { |
|
56 | $form = $this->factory |
|
57 | ->createBuilder(FormType::class) |
|
58 | ->add($buttonName = 'button', ButtonType::class) |
|
59 | ->getForm(); |
|
60 | ||
61 | $view = $form->createView(); |
|
62 | $buttonView = $view->children[$buttonName]; |
|
63 | ||
64 | $this->assertArrayHasKey('label', $buttonView->vars); |
|
65 | $this->assertNull($buttonView->vars['label']); |
|
66 | ||
67 | $this->assertArrayHasKey('label_translation_arguments', $buttonView->vars); |
|
68 | $this->assertEmpty($buttonView->vars['label_translation_arguments']); |
|
69 | } |
|
70 | ||
71 | public function testLabelPrefix() |
|
72 | { |
@@ 54-69 (lines=16) @@ | ||
51 | $this->assertSame(FormType::class, $this->extension->getExtendedType()); |
|
52 | } |
|
53 | ||
54 | public function testDefault() |
|
55 | { |
|
56 | $form = $this->factory |
|
57 | ->createBuilder(FormType::class) |
|
58 | ->add($fieldName = 'field', FormType::class) |
|
59 | ->getForm(); |
|
60 | ||
61 | $view = $form->createView(); |
|
62 | $buttonView = $view->children[$fieldName]; |
|
63 | ||
64 | $this->assertArrayHasKey('label', $buttonView->vars); |
|
65 | $this->assertNull($buttonView->vars['label']); |
|
66 | ||
67 | $this->assertArrayHasKey('label_translation_arguments', $buttonView->vars); |
|
68 | $this->assertEmpty($buttonView->vars['label_translation_arguments']); |
|
69 | } |
|
70 | ||
71 | public function testLabelPrefix() |
|
72 | { |