예제 #1
0
 /**
  * @expectedException \OCP\Files\LockNotAcquiredException
  */
 public function testOpenAndRead()
 {
     $storage1 = new LockingWrapper(array('storage' => $this->fileSystem));
     $storage2 = new LockingWrapper(array('storage' => $this->fileSystem));
     $fh1 = $storage1->fopen('foo.txt', 'r');
     $fh2 = $storage2->fopen('foo.txt', 'w');
 }
예제 #2
0
 public function testRenameAndWrite()
 {
     $storage1 = new LockingWrapper(array('storage' => $this->fileSystem));
     $fh = $storage1->fopen('foo.txt', 'r');
     $storage1->rename('foo.txt', 'bar.txt');
     $storage1->unlink('bar.txt');
     $this->assertTrue(true);
 }