public function testTextArea() { $I = $this->codeGuy; $html = TbHtml::textArea('textarea', 'Textarea text', array('class' => 'textarea')); $textarea = $I->createNode($html, 'textarea'); $I->seeNodeAttributes($textarea, array('class' => 'textarea', 'id' => 'textarea', 'name' => 'textarea')); $I->seeNodeText($textarea, 'Textarea text'); }
<h3>Inputs</h3> <div class="bs-docs-example"> <?php echo TbHtml::textField('text', '', array('placeholder' => 'Text input')); ?> </div> <pre class="prettyprint linenums"> <?php echo TbHtml::textField('text', '', array('placeholder' => 'Text input')); ?></pre> <h3>Text area</h3> <div class="bs-docs-example"> <?php echo TbHtml::textArea('text', '', array('rows' => 3)); ?> </div> <pre class="prettyprint linenums"> <?php echo TbHtml::textArea('text', '', array('rows' => 3)); ?></pre> <h3>Checkboxes and radios</h3> <h4>Default (stacked)</h4> <div class="bs-docs-example"> <?php echo TbHtml::checkBox('checkBox', '', array('label' => 'Option one is this and that—be sure to include why it\'s great')); ?> <br> <?php
public function testTextArea() { $I = $this->codeGuy; $html = TbHtml::textArea('textarea', 'Textarea text', array('class' => 'textarea')); $textarea = $I->createNode($html, 'textarea.form-control'); $I->seeNodeAttributes($textarea, array('class' => 'textarea form-control', 'id' => 'textarea', 'name' => 'textarea')); $I->seeNodeText($textarea, 'Textarea text'); $html = TbHtml::textArea('textarea', 'Textarea text', array('xs' => 6, 'md' => 6, 'class' => 'textarea')); $div = $I->createNode($html, 'div'); $I->seeNodeCssClass($div, 'col-xs-6'); $I->seeNodeCssClass($div, 'col-md-6'); $textarea = $div->filter('textarea'); $I->seeNodeAttributes($textarea, array('class' => 'textarea form-control', 'id' => 'textarea', 'name' => 'textarea')); $I->seeNodeText($textarea, 'Textarea text'); }