mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR CoreTest::testGetTempPathInProject() will try to create a temp dirs when running. CoreTest::tearDown() will now remove these temp dirs when the test finishes (from r111748)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112919 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
25af09b0f6
commit
dd92459517
@ -13,7 +13,7 @@ class CoreTest extends SapphireTest {
|
|||||||
|
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->tempPath = $tempPath = Director::baseFolder() . '/silverstripe-cache';
|
$this->tempPath = Director::baseFolder() . '/silverstripe-cache';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetTempPathInProject() {
|
public function testGetTempPathInProject() {
|
||||||
@ -31,4 +31,17 @@ class CoreTest extends SapphireTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function tearDown() {
|
||||||
|
parent::tearDown();
|
||||||
|
if(file_exists(getSysTempDir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe')) {
|
||||||
|
rmdir(getSysTempDir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe');
|
||||||
|
}
|
||||||
|
if(file_exists(getSysTempDir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe')) {
|
||||||
|
rmdir(getSysTempDir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe');
|
||||||
|
}
|
||||||
|
if(file_exists(getSysTempDir() . '/silverstripe-cache-var-www-silverstripe')) {
|
||||||
|
rmdir(getSysTempDir() . '/silverstripe-cache-var-www-silverstripe');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user