/**
  * tx_dam::process_editFile()
  */
 public function test_process_editFile()
 {
     $this->removeFixtureTempFiles();
     $this->removeIndexSetup();
     $this->removeFixturesFromIndex();
     $this->addFixturePathToFilemount();
     $filepath = $this->getFixtureTempFilename('txt');
     $newContent = md5(time());
     tx_dam::process_editFile($filepath, $newContent);
     $uid = tx_dam::file_isIndexed($filepath);
     self::assertUID($uid, 'File index not found');
     $data = tx_dam::meta_getDataByUid($uid, 'abstract');
     self::assertEquals($newContent, $newContent);
     $this->removeFixturePathFromFilemount();
     $this->removeFixturesFromIndex();
     $this->removeIndexSetup();
     $this->removeFixtureTempFiles();
 }
 /**
  * Main function, rendering the content of the rename form
  *
  * @return	void
  */
 function main()
 {
     global $LANG;
     $content = '';
     if (is_array($this->pObj->data) and isset($this->pObj->data['file_content'])) {
         // process conent update
         $error = tx_dam::process_editFile($this->pObj->media->getInfoArray(), $this->pObj->data['file_content']);
         if ($error) {
             $content .= $this->pObj->errorMessageBox($error);
         } elseif (t3lib_div::_GP('_saveandclosedok_x')) {
             $this->pObj->redirect(true);
             return;
         }
     }
     $content .= $this->renderForm(t3lib_div::getURL($this->pObj->media->getPathAbsolute()));
     return $content;
 }