Skip to content

Commit

Permalink
Merge pull request #333 from matslindh/fix-windows-temp-path-filesyst…
Browse files Browse the repository at this point in the history
…ems-test

Fix usage of hard coded temp directory in FileSystem-based tests.
  • Loading branch information
rexxars committed May 28, 2015
2 parents bd92a7a + c128a0d commit 1828d75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FilesystemTest extends StorageTests {
/**
* @var string
*/
private $path = '/tmp/imboVariationsFilesystemIntegrationTest';
private $path = null;

/**
* @see ImboIntegrationTest\Storage\StorageTests::getAdapter()
Expand All @@ -37,6 +37,8 @@ protected function getAdapter() {
* Set up the directory for each test, ensuring it's empty
*/
public function setUp() {
$this->path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'imboVariationsFilesystemIntegrationTest';

if (is_dir($this->path)) {
$this->rmdir($this->path);
}
Expand Down
4 changes: 3 additions & 1 deletion tests/phpunit/ImboIntegrationTest/Storage/FilesystemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class FilesystemTest extends StorageTests {
/**
* @var string
*/
private $path = '/tmp/imboFilesystemIntegrationTest';
private $path = null;

/**
* @see ImboIntegrationTest\Storage\StorageTests::getDriver()
Expand All @@ -33,6 +33,8 @@ protected function getDriver() {
}

public function setUp() {
$this->path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'imboFilesystemIntegrationTest';

if (is_dir($this->path)) {
$this->rmdir($this->path);
}
Expand Down

0 comments on commit 1828d75

Please sign in to comment.