Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR #6397 CoreTest should use test specific paths, otherwise confli…

…cts can occur in certain environments

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@115854 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit a569567acf4419e9288d93020e5372f6b182a09e 1 parent 8aa6ae9
@halkyon halkyon authored sminnee committed
Showing with 10 additions and 11 deletions.
  1. +10 −11 tests/CoreTest.php
View
21 tests/CoreTest.php
@@ -1,5 +1,4 @@
<?php
-
/**
* Tests for the core of sapphire, such as how the temporary
* directory is determined throughout the framework.
@@ -21,26 +20,26 @@ public function testGetTempPathInProject() {
$this->assertEquals(getTempFolder(), $this->tempPath);
} else {
// A typical Windows location for where sites are stored on IIS
- $this->assertEquals(getTempFolder('C:\\inetpub\\wwwroot\\silverstripe'), getSysTempDir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe');
+ $this->assertEquals(getTempFolder('C:\\inetpub\\wwwroot\\silverstripe-test-project'), getSysTempDir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe-test-project');
// A typical Mac OS X location for where sites are stored
- $this->assertEquals(getTempFolder('/Users/joebloggs/Sites/silverstripe'), getSysTempDir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe');
-
+ $this->assertEquals(getTempFolder('/Users/joebloggs/Sites/silverstripe-test-project'), getSysTempDir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe-test-project');
+
// A typical Linux location for where sites are stored
- $this->assertEquals(getTempFolder('/var/www/silverstripe'), getSysTempDir() . '/silverstripe-cache-var-www-silverstripe');
+ $this->assertEquals(getTempFolder('/var/www/silverstripe-test-project'), getSysTempDir() . '/silverstripe-cache-var-www-silverstripe-test-project');
}
}
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-cacheC--inetpub-wwwroot-silverstripe-test-project')) {
+ rmdir(getSysTempDir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe-test-project');
}
- if(file_exists(getSysTempDir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe')) {
- rmdir(getSysTempDir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe');
+ if(file_exists(getSysTempDir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe-test-project')) {
+ rmdir(getSysTempDir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe-test-project');
}
- if(file_exists(getSysTempDir() . '/silverstripe-cache-var-www-silverstripe')) {
- rmdir(getSysTempDir() . '/silverstripe-cache-var-www-silverstripe');
+ if(file_exists(getSysTempDir() . '/silverstripe-cache-var-www-silverstripe-test-project')) {
+ rmdir(getSysTempDir() . '/silverstripe-cache-var-www-silverstripe-test-project');
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.