コード例 #1
0
ファイル: attachment.php プロジェクト: weareathlon/silla.io
 /**
  * Initialize attachments.
  *
  * @param Base\Model $resource Currently processed resource.
  * @param array      $params   Additional parameters.
  *
  * @static
  * @access public
  *
  * @return void
  */
 public static function init(Base\Model $resource, array $params)
 {
     self::$attachments = $resource::attachmentsFields();
     foreach (self::$attachments as $name => $_attachment) {
         self::$attachmentsOld[$name] = $resource->{$name};
         self::$isUploading[$name] = Helpers\File::uploadedFileExists($name);
     }
 }
コード例 #2
0
ファイル: fileTest.php プロジェクト: weareathlon/silla.io
 /**
  * @covers Core\Helpers\File::uploadedFileExists
  */
 public function testUploadedFileDoesNotExist()
 {
     unset($_FILES['test']['name']);
     $this->assertFalse(File::uploadedFileExists($this->fileRoot));
 }