);
} public function testLabelHtmlDefaultIsFalse() { $form =
$this->factory->
createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null,
[ 'label' => '<b>Bolded label</b>',
]);
$html =
$this->
renderLabel($form->
createView(), null,
[ 'label_attr' =>
[ 'class' => 'my&class',
],
]);
$this->
assertMatchesXpath($html, '/label[@for="name"][@class="my&class required"][.="[trans]<b>Bolded label</b>[/trans]"]'
);
$this->
assertMatchesXpath($html, '/label[@for="name"][@class="my&class required"]/b[.="Bolded label"]', 0
);
} public function testLabelHtmlIsTrue() {