function test_image_resize_with_percentual_width_and_height() { $img = new canvas(); $img->create_empty_image(200, 200); $img->resize("25%", "30%"); $img->save("/tmp/test_image.jpg"); $imagesize = getimagesize("/tmp/test_image.jpg"); $this->assertEqual($imagesize[0], 50); $this->assertEqual($imagesize[1], 60); @unlink("/tmp/test_image.jpg"); }