mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #3077 from tractorcow/pulls/fix-imagetest
BUG Fix ImageTest
This commit is contained in:
commit
ff42ad268e
@ -11,15 +11,14 @@ class ImageTest extends SapphireTest {
|
||||
protected $origBackend;
|
||||
|
||||
public function setUp() {
|
||||
if(get_class($this) == "ImageTest")
|
||||
$this->skipTest = true;
|
||||
if(get_class($this) == "ImageTest") $this->skipTest = true;
|
||||
|
||||
parent::setUp();
|
||||
|
||||
$this->origBackend = Image::get_backend();
|
||||
|
||||
if($this->skipTest)
|
||||
return;
|
||||
|
||||
$this->origBackend = Image::get_backend();
|
||||
|
||||
if(!file_exists(ASSETS_PATH)) mkdir(ASSETS_PATH);
|
||||
|
||||
@ -34,7 +33,7 @@ class ImageTest extends SapphireTest {
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
Image::set_backend($this->origBackend);
|
||||
if($this->origBackend) Image::set_backend($this->origBackend);
|
||||
|
||||
/* Remove the test files that we've created */
|
||||
$fileIDs = $this->allFixtureIDs('Image');
|
||||
|
Loading…
x
Reference in New Issue
Block a user