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 public function __construct()
16 parent
::__construct();
17 $this->dir
= 'tmp/' . md5(uniqid(rand(), true)) . '/';
19 $this->oldDir
= getcwd();
23 public function __destruct()
25 FSTools
::singleton()->rmdirr($this->dir
);
28 public function setup()
33 public function tearDown()