/** * @test */ function sync_with_check_time() { $syncFrom = __DIR__ . '/sync-test'; $syncTo = __DIR__ . '/sync-done'; if (!file_exists($syncTo)) { mkdir($syncTo, 0777); } file_put_contents($syncTo . '/test0.txt', 'tested time stamp update'); $sync = new FlySync(FlySystems::local($syncFrom), FlySystems::local($syncTo)); $sync->checkTimeStamp(); $sync->syncDir('/'); $this->assertEquals('tested time stamp update', file_get_contents($syncTo . '/test0.txt')); }
/** * @param string $storage * @return $this */ public function local($storage) { $this->fileSystem = FlySystems::local($storage); return $this; }