ImageGdTest.php 644 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace yiiunit\imagine;
  3. use yii\imagine\Image;
  4. /**
  5. * @group gd
  6. */
  7. class ImageGdTest extends AbstractImageTest
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. protected function setUp()
  13. {
  14. if (!function_exists('gd_info')) {
  15. $this->markTestSkipped('Skipping ImageGdTest, Gd not installed');
  16. } else {
  17. Image::setImagine(null);
  18. Image::$driver = Image::DRIVER_GD2;
  19. parent::setUp();
  20. }
  21. }
  22. protected function isFontTestSupported()
  23. {
  24. $infos = gd_info();
  25. return isset($infos['FreeType Support']) ? $infos['FreeType Support'] : false;
  26. }
  27. }