22 $this->response =
new HTTP\ResponseMock();
24 $this->server->sapi =
new HTTP\SapiMock();
26 $this->server->debugExceptions =
true;
28 file_put_contents(SABRE_TEMPDIR .
'/test.txt',
'Test contents');
29 mkdir(SABRE_TEMPDIR .
'/dir');
30 file_put_contents(SABRE_TEMPDIR .
'/dir/child.txt',
'Child contents');
49 foreach (scandir(
$path) as $node) {
51 if ($node ==
'.' || $node ==
'.svn' || $node ==
'..')
continue;
52 $myPath =
$path .
'/' . $node;
53 if (is_file($myPath)) {
60 if ($deleteRoot) rmdir(
$path);
An exception for terminatinating execution or to throw for unit testing.
deleteTree($path, $deleteRoot=true)