blob: fcff13df805c2d70ee62ca896c8df6ed34fd0f94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<?php
require_once dirname(__FILE__) . '/BaseTestCase.php';
class BasicTest extends BaseTestCase {
private function makeDir($dir) {
if (!file_exists($dir)) {
$ok = @mkdir($dir, 0777, true);
if (!$ok) throw new Exception('Could not create source directory: ' . $dir);
}
return $dir;
}
private function sourceDir() {
return $this->makeDir(dirname(__FILE__) . '/data/source');
}
private function destDir() {
return $this->makeDir(dirname(__FILE__) . '/data/dest');
}
private function scriptPath() {
return dirname(dirname(__FILE__)) . '/rsync_tmbackup.sh';
}
private function execScript($args) {
$cmd = $this->scriptPath() . ' ' . implode(' ', $args);
exec($cmd, $output, $errorCode);
return array(
'output' => $output,
'errorCode' => $errorCode,
);
}
public function testFilesAreCopied() {
//$this->execScript(
}
}
|