silverstripe-framework/tests/model/GDImageTest.php
2016-09-09 18:43:05 +12:00

30 lines
585 B
PHP

<?php
use SilverStripe\Core\Config\Config;
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() {
$cache = Cache::factory('GDBackend_Manipulations');
$cache->clean(Zend_Cache::CLEANING_MODE_ALL);
parent::tearDown();
}
}