コード例 #1
0
ファイル: FormFileTest.php プロジェクト: rajanlamic/IntTest
 /**
  * @return Element\File
  */
 public function getCompleteElement()
 {
     $element = new Element\File('foo');
     $element->setAttributes(array('accept' => 'value', 'alt' => 'value', 'autocomplete' => 'on', 'autofocus' => 'autofocus', 'checked' => 'checked', 'dirname' => 'value', 'disabled' => 'disabled', 'form' => 'value', 'formaction' => 'value', 'formenctype' => 'value', 'formmethod' => 'value', 'formnovalidate' => 'value', 'formtarget' => 'value', 'height' => 'value', 'id' => 'value', 'list' => 'value', 'max' => 'value', 'maxlength' => 'value', 'min' => 'value', 'multiple' => false, 'name' => 'value', 'pattern' => 'value', 'placeholder' => 'value', 'readonly' => 'readonly', 'required' => 'required', 'size' => 'value', 'src' => 'value', 'step' => 'value', 'width' => 'value'));
     $element->setValue('value');
     return $element;
 }
コード例 #2
0
ファイル: FileTest.php プロジェクト: rexmac/zf2
 public function testCanPrependFileToContent()
 {
     $element = new FileElement('foo');
     $element->setValue('foobar')->setView($this->getView());
     $this->decorator->setElement($element)->setOption('placement', 'prepend');
     $file = $this->decorator->render('content');
     $this->assertRegexp('#<input[^>]*>.*?(content)#s', $file, $file);
 }