mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
try to use unique test directories
any tests that use the filesystem should have their own unique directory, as we run our test suite in parallel and cleanup of tests (removing directories) should not interfere with currently running tests
This commit is contained in:
parent
06a21132db
commit
adf3b956d0
25 changed files with 145 additions and 91 deletions
|
@ -14,9 +14,10 @@ namespace Composer\Test\Json;
|
|||
|
||||
use Composer\Config\JsonConfigSource;
|
||||
use Composer\Json\JsonFile;
|
||||
use Composer\TestCase;
|
||||
use Composer\Util\Filesystem;
|
||||
|
||||
class JsonConfigSourceTest extends \PHPUnit_Framework_TestCase
|
||||
class JsonConfigSourceTest extends TestCase
|
||||
{
|
||||
/** @var Filesystem */
|
||||
private $fs;
|
||||
|
@ -31,8 +32,7 @@ class JsonConfigSourceTest extends \PHPUnit_Framework_TestCase
|
|||
protected function setUp()
|
||||
{
|
||||
$this->fs = new Filesystem;
|
||||
$this->workingDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'cmptest';
|
||||
$this->fs->ensureDirectoryExists($this->workingDir);
|
||||
$this->workingDir = $this->getUniqueTmpDirectory();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue