/** * @throws \Kisphp\ImageFileTypeNotAllowed */ public function testBackground() { $source = __DIR__ . self::IMAGES_DIR . '/300x200.jpg'; $target = __DIR__ . self::IMAGES_DIR . '/th-dummy.jpg'; $im = new \Kisphp\ImageResizer(); $im->setBackgroundColor(25, 25, 25); $im->load($source); $im->setTarget($target); $im->resize(100, 100); $im->save(); $imageContent = $im->display(true); $this->assertNotNull($imageContent); unlink($target); }