Пример #1
0
 function testSetMaxSizeMethodCastsInputToInt()
 {
     $input = new T_Form_Upload('myalias', 'mylabel');
     $input->setMaxSize('53');
     $this->assertSame($input->getMaxSize(), 53);
 }
Пример #2
0
 /**
  * Visit a file upload input node.
  *
  * @param T_Form_Upload $node
  */
 function visitFormUpload(T_Form_Upload $node)
 {
     $attributes = $node->getAllAttributes();
     $attributes += array('type' => 'file', 'name' => $node->getFieldname(), 'id' => $this->getNodeId($node));
     $xhtml = $this->createLabel($node) . $this->createInput($node, $attributes);
     $this->addXhtml($xhtml);
 }