public function setUp()
 {
     if (!extension_loaded('gd')) {
         $this->markTestSkipped('The GD extension is not available.');
         return;
     }
     $this->factory = ImageFactory::getInstance();
     $this->mockExtension = 'mock';
     $this->mockResource = imageCreateTrueColor(50, 50);
 }
Example #2
0
 protected function setUp()
 {
     $this->setUpApplication(__DIR__ . '/../../../..');
     if (!extension_loaded('gd')) {
         $this->markTestSkipped('The GD extension is not available.');
         return;
     }
     $imageFactory = ImageFactory::getInstance();
     $imageFactory->register('jpg', new JpgImageIO());
     $this->testImage = new File('application/data/test.jpg');
     $this->testImageWidth = 300;
     $this->testImageHeight = 232;
 }
 public function tearDown()
 {
     $this->tearDownApplication();
     Reflection::setProperty(ImageFactory::getInstance(), 'instance', null);
 }
Example #4
0
 /**
  * Write this Image instance to file
  * @param File file to write the image to
  * @return null
  */
 public function write(File $file)
 {
     ImageFactory::getInstance()->write($file, $this->resource);
 }