Example #1
0
 public function provideImage()
 {
     Image::setConfig(realpath(__DIR__ . '/../../' . self::CONFIG));
     // build File mock
     $file = $this->getMockBuilder('\\Webiny\\Component\\Storage\\File\\File')->disableOriginalConstructor()->setMethods(['getAbsolutePath', 'getKey'])->getMock();
     // getAbsolutePath mock
     $file->expects($this->any())->method('getAbsolutePath')->will($this->returnValue(__DIR__ . '/../../image.gif'));
     // getKey mock
     $file->expects($this->once())->method('getKey')->will($this->returnValue(__DIR__ . '/../../image.gif'));
     $image = ImageLoader::open($file);
     return [[$image]];
 }
Example #2
0
 public function setUp()
 {
     Image::setConfig(realpath(__DIR__ . self::CONFIG));
 }