public function load(PropertyModel $property, DocumentModel $document, $filename = null)
{
$this->setProperty($property);
$this->setDocument($document);
$this->setFileName($filename);
}
/** * Initiliaze files * * @return void */ protected function initializeFiles() { $_FILES = array('test' => array('name' => __DIR__ . '/_files/test.jpg', 'type' => 'plain/text', 'size' => 8, 'tmp_name' => __DIR__ . '/_files/test.jpg', 'error' => 0)); $property = PropertyModel::fromArray(array('id' => 'test-upload')); $document = DocumentModel::fromArray(array('id' => 'test-upload')); $this->object->load($property, $document, 'test'); }