Ejemplo n.º 1
0
 /**
  * @test
  * @group luszo
  */
 public function createsNewResourceWhenCopyingIfExclusive()
 {
     $upload = ROOT_TESTS . '/data/self-lussing-manatee.jpg';
     $file = $this->filelib->getFileRepository()->upload($upload, null, 'tussi');
     $this->filelib->getFileRepository()->afterUpload($file);
     $folder = $this->filelib->createFolderByUrl('exclusivo');
     $file2 = $this->filelib->getFileRepository()->copy($file, $folder);
     $this->assertInstanceOf('Xi\\Filelib\\File\\File', $file);
     $this->assertTrue($file->getResource()->isExclusive());
     $this->assertNotSame($file->getResource(), $file2->getResource());
 }