2012-10-25 00:28:39 +02:00
|
|
|
<?php
|
2014-01-02 16:59:34 +01:00
|
|
|
|
2016-08-19 00:51:35 +02:00
|
|
|
use SilverStripe\Core\Config\Config;
|
2016-09-09 08:43:05 +02:00
|
|
|
use SilverStripe\Core\Cache;
|
2016-08-19 00:51:35 +02:00
|
|
|
|
2012-10-25 00:28:39 +02:00
|
|
|
class GDImageTest extends ImageTest {
|
2014-01-02 16:59:34 +01:00
|
|
|
|
2012-10-25 00:28:39 +02:00
|
|
|
public function setUp() {
|
2015-06-10 01:16:11 +02:00
|
|
|
parent::setUp();
|
2015-09-15 04:52:02 +02:00
|
|
|
|
2015-07-16 12:12:15 +02:00
|
|
|
if(!extension_loaded("gd")) {
|
2015-09-15 04:52:02 +02:00
|
|
|
$this->markTestSkipped("The GD extension is required");
|
2015-07-16 12:12:15 +02:00
|
|
|
return;
|
2015-09-15 04:52:02 +02:00
|
|
|
}
|
|
|
|
|
2016-08-19 00:51:35 +02:00
|
|
|
/** @skipUpgrade */
|
|
|
|
Config::inst()->update(
|
|
|
|
'SilverStripe\\Core\\Injector\\Injector',
|
|
|
|
'Image_Backend',
|
|
|
|
'SilverStripe\\Assets\\GDBackend'
|
|
|
|
);
|
2012-10-25 00:28:39 +02:00
|
|
|
}
|
2014-01-02 16:59:34 +01:00
|
|
|
|
|
|
|
public function tearDown() {
|
2016-09-09 08:43:05 +02:00
|
|
|
$cache = Cache::factory('GDBackend_Manipulations');
|
2014-01-02 16:59:34 +01:00
|
|
|
$cache->clean(Zend_Cache::CLEANING_MODE_ALL);
|
|
|
|
parent::tearDown();
|
|
|
|
}
|
2012-10-25 00:28:39 +02:00
|
|
|
}
|