$this->
assertMatchesXpath($html, '/label[@for="name"][@class="my&class col-sm-2 control-label required"][.="[trans]<b>Bolded label</b>[/trans]"]', 0
);
$this->
assertMatchesXpath($html, '/label[@for="name"][@class="my&class col-sm-2 control-label required"]/b[.="Bolded label"]'
);
} public function testStartTag() { $form =
$this->factory->
create('Symfony\Component\Form\Extension\Core\Type\FormType', null,
[ 'method' => 'get',
'action' => 'http://example.com/directory',
]);
$html =
$this->
renderStart($form->
createView());
$this->
assertSame('<form name="form" method="get" action="http://example.com/directory" class="form-horizontal">',
$html);
} public function testStartTagWithOverriddenVars() { $form =
$this->factory->
create('Symfony\Component\Form\Extension\Core\Type\FormType', null,
[ 'method' => 'put',
'action' => 'http://example.com/directory',
]);