public function testOutputPng() { $image = $this->createImage(200, 100, 'png'); $resize = new ImageResize($image); ob_start(); // supressing header errors @$resize->output(); $image_contents = ob_get_clean(); $info = finfo_open(); $type = finfo_buffer($info, $image_contents, FILEINFO_MIME_TYPE); $this->assertEquals('image/png', $type); }