/**
  * Check for file types. Only difference is that it is possible to upload multiple files
  * @param $files
  * @param $mimetypes
  * @return bool
  */
 public static function mimeType($files, $mimetypes)
 {
     $valid = false;
     if (isset($files[0]['tmp_name'])) {
         foreach ($files as $file) {
             if (Validation::mimeType($file, $mimetypes) === false) {
                 return false;
             }
             $valid = true;
         }
     } else {
         $valid = Validation::mimeType($files, $mimetypes);
     }
     return $valid;
 }
 /**
  * testMimeTypeFalse method
  *
  * @expectedException \RuntimeException
  * @return void
  */
 public function testMimeTypeFalse()
 {
     $image = CORE_PATH . 'Cake/Test/TestApp/webroot/img/cake.power.gif';
     $File = new File($image, false);
     $this->skipIf($File->mime(), 'mimeType can be determined, no Exception will be thrown');
     Validation::mimeType($image, ['image/gif']);
 }