4 * Test harness that sets up a filesystem sandbox for file-emulation
5 * functions to safely unit test in.
7 * @todo Make an automatic FSTools mock or something
9 class FSTools_FileSystemHarness
extends UnitTestCase
12 protected $dir, $oldDir;
14 function __construct() {
15 parent
::__construct();
16 $this->dir
= 'tmp/' . md5(uniqid(rand(), true)) . '/';
18 $this->oldDir
= getcwd();
22 function __destruct() {
23 FSTools
::singleton()->rmdirr($this->dir
);