Пример #1
0
 /**
  * @expectedException \Upload\Exception
  */
 public function testInvalidMimetype()
 {
     $file = new \Upload\FileInfo($this->assetsDirectory . '/foo.txt', 'foo.txt');
     $validation = new \Upload\Validation\Mimetype(array('image/png'));
     $validation->validate($file);
     // <-- SHOULD throw exception
 }
Пример #2
0
 public function testInvalidMimetype()
 {
     $file = new \Upload\File('foo', $this->storage);
     $validation = new \Upload\Validation\Mimetype(array('image/png'));
     $this->assertFalse($validation->validate($file));
 }