Example #1
0
 public function test_it_can_be_instantiated_with_an_url()
 {
     $url = 'http://example.com/example.png';
     $image = Image::url($url);
     $this->assertTrue($image->isUrl());
     $this->assertSame($url, $image->getData());
     $this->assertFalse($image->isBase64());
     $this->assertFalse($image->isFile());
 }
Example #2
0
 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'));
 }