/** * Constructor. * * @param string $name The name. * @param string[optional] $class The CSS-class to be used. * @param string[optional] $classError The CSS-class to be used when there is an error. * @see SpoonFormFile::__construct() */ public function __construct($name, $class = 'inputFilefield', $classError = 'inputFilefieldError') { // call the parent parent::__construct($name, $class, $classError); // is the form submitted and the file is uploaded? if ($this->isSubmitted() && is_uploaded_file($this->getTempFileName())) { $this->properties = @getimagesize($this->getTempFileName()); } else { $this->properties = false; } }
public function testIsFilled() { $_POST['form'] = 'filefield'; $this->assertEquals(true, $this->filePDF->isFilled()); }