namespace Symfony\Bridge\Twig\Tests\Extension;
use Symfony\Component\Form\Extension\Core\Type\PercentType;
use Symfony\Component\Form\FormError;
abstract class AbstractBootstrap3LayoutTestCase extends AbstractLayoutTestCase
{ public function testLabelOnForm() { $form =
$this->factory->
createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\DateType', null,
['widget' => 'choice'
]);
$view =
$form->
createView();
$this->
renderWidget($view,
['label' => 'foo'
]);
$html =
$this->
renderLabel($view);
$this->
assertMatchesXpath($html,
'/label
[@class="control-label required"]
[.="[trans]Name[/trans]"]
'
);
}