public function testStaticCallRaw() { $data = file_get_contents('public/test.jpg'); $img = Image::raw($data); $this->assertInternalType('resource', $img->resource); $this->assertInternalType('int', $img->width); $this->assertInternalType('int', $img->height); $this->assertEquals($img->width, 800); $this->assertEquals($img->height, 600); }
/** * Create a new image resource with image data from string * * @param string $data * @return \Intervention\Image\Image * @static */ public static function raw($string) { return \Intervention\Image\Image::raw($string); }