Ejemplo n.º 1
0
 public function testSetAndGetHelp()
 {
     $element = new Text('test');
     $help = 'this is a help text';
     $element->setHelp($help);
     $this->assertEquals($help, $element->getHelp());
 }
Ejemplo n.º 2
0
 public function testSetPlacementBefore()
 {
     $text = new Text('test');
     $text->addDecorator('helpblock', ['name' => 'helpblock', 'placement' => 'before']);
     $text->setHelp('This is a help text!');
     $expected = '<span class="help-block">This is a help text!</span>' . '<input id="form_test" class="form-control" name="test" type="text" />';
     $this->assertEquals($expected, $text->render());
 }