mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Fixed tests
This commit is contained in:
parent
3ff6002936
commit
4a3070757b
@ -20,26 +20,26 @@ class CoreTest extends SapphireTest {
|
|||||||
$this->assertEquals(getTempFolder(), $this->tempPath);
|
$this->assertEquals(getTempFolder(), $this->tempPath);
|
||||||
} else {
|
} else {
|
||||||
// A typical Windows location for where sites are stored on IIS
|
// A typical Windows location for where sites are stored on IIS
|
||||||
$this->assertEquals(getTempFolder('C:\\inetpub\\wwwroot\\silverstripe-test-project'), getSysTempDir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe-test-project');
|
$this->assertEquals(getTempFolder('C:\\inetpub\\wwwroot\\silverstripe-test-project'), sys_get_temp_dir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe-test-project');
|
||||||
|
|
||||||
// A typical Mac OS X location for where sites are stored
|
// A typical Mac OS X location for where sites are stored
|
||||||
$this->assertEquals(getTempFolder('/Users/joebloggs/Sites/silverstripe-test-project'), getSysTempDir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe-test-project');
|
$this->assertEquals(getTempFolder('/Users/joebloggs/Sites/silverstripe-test-project'), sys_get_temp_dir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe-test-project');
|
||||||
|
|
||||||
// A typical Linux location for where sites are stored
|
// A typical Linux location for where sites are stored
|
||||||
$this->assertEquals(getTempFolder('/var/www/silverstripe-test-project'), getSysTempDir() . '/silverstripe-cache-var-www-silverstripe-test-project');
|
$this->assertEquals(getTempFolder('/var/www/silverstripe-test-project'), sys_get_temp_dir() . '/silverstripe-cache-var-www-silverstripe-test-project');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown() {
|
public function tearDown() {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
if(file_exists(getSysTempDir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe-test-project')) {
|
if(file_exists(sys_get_temp_dir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe-test-project')) {
|
||||||
rmdir(getSysTempDir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe-test-project');
|
rmdir(sys_get_temp_dir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe-test-project');
|
||||||
}
|
}
|
||||||
if(file_exists(getSysTempDir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe-test-project')) {
|
if(file_exists(sys_get_temp_dir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe-test-project')) {
|
||||||
rmdir(getSysTempDir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe-test-project');
|
rmdir(sys_get_temp_dir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe-test-project');
|
||||||
}
|
}
|
||||||
if(file_exists(getSysTempDir() . '/silverstripe-cache-var-www-silverstripe-test-project')) {
|
if(file_exists(sys_get_temp_dir() . '/silverstripe-cache-var-www-silverstripe-test-project')) {
|
||||||
rmdir(getSysTempDir() . '/silverstripe-cache-var-www-silverstripe-test-project');
|
rmdir(sys_get_temp_dir() . '/silverstripe-cache-var-www-silverstripe-test-project');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user