/** * @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 }
public function testInvalidMimetype() { $file = new \Upload\File('foo', $this->storage); $validation = new \Upload\Validation\Mimetype(array('image/png')); $this->assertFalse($validation->validate($file)); }