Fixing broken CoreTest when using silverstripe-cache for temp folder

This commit is contained in:
Sean Harvey 2013-05-13 23:39:52 +12:00
parent 15f7c884f8
commit bb6283740a

View File

@ -16,11 +16,11 @@ class CoreTest extends SapphireTest {
}
public function testGetTempPathInProject() {
if(file_exists($this->tempPath)) {
$this->assertEquals(getTempFolder(BASE_PATH), $this->tempPath);
} else {
$user = getTempFolderUsername();
$user = getTempFolderUsername();
if(file_exists($this->tempPath)) {
$this->assertEquals(getTempFolder(BASE_PATH), $this->tempPath . '/' . $user);
} else {
// A typical Windows location for where sites are stored on IIS
$this->assertEquals(sys_get_temp_dir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe-test-project/' . $user,
getTempFolder('C:\\inetpub\\wwwroot\\silverstripe-test-project'));