diff options
| author | Laurent Cozic <laurent@cozic.net> | 2017-11-26 16:59:29 +0000 |
|---|---|---|
| committer | Laurent Cozic <laurent@cozic.net> | 2017-11-26 16:59:29 +0000 |
| commit | 2d0cb29bcb88104e44d04aeb2860cbaf25cd32cd (patch) | |
| tree | e13739b6ffca0f6d5b12551f1b67c7811beb2e3b /tests/BasicTest.php | |
| parent | c608793b60ced689caacded09b6da21ffa643c16 (diff) | |
Allow specifying the expiration strategy tokens in any order (less error prone)
Diffstat (limited to 'tests/BasicTest.php')
| -rw-r--r-- | tests/BasicTest.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/BasicTest.php b/tests/BasicTest.php new file mode 100644 index 0000000..fcff13d --- /dev/null +++ b/tests/BasicTest.php @@ -0,0 +1,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( + } + +}
\ No newline at end of file |
