Code Duplication    Length = 13-13 lines in 2 locations

src/Bundle/ResourceBundle/Tests/Form/Extension/LabelButtonExtensionTest.php 1 location

@@ 71-83 (lines=13) @@
68
        $this->assertEmpty($buttonView->vars['label_translation_arguments']);
69
    }
70
71
    public function testLabelPrefix()
72
    {
73
        $form = $this->factory
74
            ->createBuilder(FormType::class, null, ['label_prefix' => $labelPrefix = 'prefix'])
75
            ->add($buttonName = 'button', ButtonType::class)
76
            ->getForm();
77
78
        $view = $form->createView();
79
        $buttonView = $view->children[$buttonName];
80
81
        $this->assertArrayHasKey('label', $buttonView->vars);
82
        $this->assertSame($labelPrefix.'.'.$buttonName, $buttonView->vars['label']);
83
    }
84
85
    public function testLabelTranslationArguments()
86
    {

src/Bundle/ResourceBundle/Tests/Form/Extension/LabelFormExtensionTest.php 1 location

@@ 71-83 (lines=13) @@
68
        $this->assertEmpty($buttonView->vars['label_translation_arguments']);
69
    }
70
71
    public function testLabelPrefix()
72
    {
73
        $form = $this->factory
74
            ->createBuilder(FormType::class, null, ['label_prefix' => $labelPrefix = 'prefix'])
75
            ->add($fieldName = 'field')
76
            ->getForm();
77
78
        $view = $form->createView();
79
        $fieldView = $view->children[$fieldName];
80
81
        $this->assertArrayHasKey('label', $fieldView->vars);
82
        $this->assertSame($labelPrefix.'.'.$fieldName, $fieldView->vars['label']);
83
    }
84
85
    public function testEmbedLabelPrefix()
86
    {