Ejemplo n.º 1
0
 public function test_valid_dimensions()
 {
     $upload = new fileupload($this->filesystem, '', false, false, 1, 1, 100, 100);
     $file1 = $this->gen_valid_filespec();
     $file2 = $this->gen_valid_filespec();
     $file2->height = 101;
     $file3 = $this->gen_valid_filespec();
     $file3->width = 0;
     $this->assertTrue($upload->valid_dimensions($file1));
     $this->assertFalse($upload->valid_dimensions($file2));
     $this->assertFalse($upload->valid_dimensions($file3));
 }