public function test_it_can_be_instantiated_with_a_base64_string() { $string = 'base-64-string-test'; $image = Image::base64($string); $this->assertTrue($image->isBase64()); $this->assertSame($string, $image->getData()); $this->assertFalse($image->isUrl()); $this->assertFalse($image->isFile()); }
public function imageProvider() { $imageFixture = __DIR__ . '/fixtures/cat.jpg'; return array(array(Image::url('http://lorempixel.com/g/400/200/cats/'), 'Test pin url'), array(Image::file($imageFixture), 'Test pin file'), array(Image::base64(base64_encode(file_get_contents($imageFixture))), 'Test pin base64')); }