コード例 #1
0
 /**
  * @test
  */
 public function it_can_render_field_with_html_value()
 {
     $this->field->setValue('<b>Body</b>');
     $str = $this->field->render();
     $expectedStr = '<textarea name="body">&lt;b&gt;Body&lt;/b&gt;</textarea>';
     $this->assertEquals($str, $expectedStr);
 }
コード例 #2
0
 /**
  * @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);
 }