silverstripe-framework/tests/model/GDImageTest.php

30 lines
585 B
PHP
Raw Normal View History

<?php
use SilverStripe\Core\Config\Config;
2016-09-09 08:43:05 +02:00
use SilverStripe\Core\Cache;
class GDImageTest extends ImageTest {
public function setUp() {
parent::setUp();
if(!extension_loaded("gd")) {
$this->markTestSkipped("The GD extension is required");
return;
}
/** @skipUpgrade */
Config::inst()->update(
'SilverStripe\\Core\\Injector\\Injector',
'Image_Backend',
'SilverStripe\\Assets\\GDBackend'
);
}
public function tearDown() {
2016-09-09 08:43:05 +02:00
$cache = Cache::factory('GDBackend_Manipulations');
$cache->clean(Zend_Cache::CLEANING_MODE_ALL);
parent::tearDown();
}
}