public function textField($field, array $options = array()) { $attributes = $this->_generatePredefinedAttributes($field); $attributes = $this->_mergeAttributes($attributes, $options); return textFieldTag($this->generateName($field), $this->_object->{$field}, $attributes); }
/** * @test */ public function shouldNotAddEmptyClassAttribute() { //given $product = new Product(array('name' => 'valid')); $formBuilder = new ModelFormBuilder($product); //when $html = $formBuilder->textField('name'); //then $this->assertNotContains('class="', $html); }