public function testCopyDoesntCopyModifiedTime() { $time = strtotime('yesterday'); $path = '/the-old-name.txt'; $newpath = '/the-new-name.txt'; $this->setupDbFetchResponse(['path_id' => 123, 'path' => $path, 'type' => 'file', 'mimetype' => 'text/plain', 'visibility' => 'public', 'size' => 2341, 'is_compressed' => 1, 'update_ts' => date('Y-m-d H:i:s', $time)]); $meta = $this->adapter->copy($path, $newpath); $this->assertGreaterThan($time, $meta['timestamp']); }
public function testCopyingNonExistentPath() { $this->assertFalse($this->adapter->copy('/this/does/not/exist.txt', '/my/new/path.txt')); }