$this->
assertMatchesXpath($html, '/label[@for="name"][@class="my&class control-label required"][.="[trans]<b>Bolded label</b>[/trans]"]', 0
);
$this->
assertMatchesXpath($html, '/label[@for="name"][@class="my&class control-label required"]/b[.="Bolded label"]'
);
} public function testHelp() { $form =
$this->factory->
createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null,
[ 'help' => 'Help text test!',
]);
$view =
$form->
createView();
$html =
$this->
renderHelp($view);
$this->
assertMatchesXpath($html,
'/span
[@id="name_help"]
[@class="help-block"]
[.="[trans]Help text test![/trans]"]
'
);
} public function testHelpAttr() {