/** * @test */ public function it_can_render_field_with_html_value() { $this->field->setValue('<b>Body</b>'); $str = $this->field->render(); $expectedStr = '<textarea name="body"><b>Body</b></textarea>'; $this->assertEquals($str, $expectedStr); }
/** * @test */ public function is_can_render_form_field() { $this->field->setAttribute('class', 'foo bar'); $this->field->setAttribute('id', 'title'); $this->field->setAttribute('value', 'Test Title'); $str = $this->field->render(); $expectedStr = '<input class="foo bar" id="title" value="Test Title" type="text" name="title" />'; $this->assertEquals($str, $expectedStr); }