2012-10-25 00:28:39 +02:00
|
|
|
<?php
|
2014-01-02 16:59:34 +01:00
|
|
|
|
2016-10-14 03:30:05 +02:00
|
|
|
namespace SilverStripe\ORM\Tests;
|
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
require_once __DIR__ . "/ImageTest.php";
|
2016-09-12 08:16:39 +02: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-10-14 03:30:05 +02:00
|
|
|
use Zend_Cache;
|
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
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();
|
|
|
|
}
|
2012-10-25 00:28:39 +02:00
|
|
|
}
|