Пример #1
0
 /**
  * Testing the alphabetical sort order on the enum.
  *
  * @since 1.0
  */
 public function testAlphaSortOrder()
 {
     $enum = new Enum(array('alpha', 'gamma', 'beta'));
     $options = $enum->getOptions(true);
     $this->assertEquals($options[1], 'beta', 'testing the alphabetical sort order on the enum');
 }
Пример #2
0
 /**
  * Caches the image to the cache directory.
  *
  * @param image $image the binary GD image stream to save
  *
  * @since 1.0
  */
 private function cache($image)
 {
     $config = ConfigProvider::getInstance();
     if ($this->sourceType->getValue() == 'png' && $config->get('cms.images.perserve.png')) {
         imagepng($image, $this->filename);
     } else {
         imagejpeg($image, $this->filename, 100 * $this->quality->getValue());
     }
 }