Skip to content
Permalink
Browse files

Add a copy test

  • Loading branch information...
alexpott committed Oct 30, 2019
1 parent d4a62ee commit 227695ad0b20b2a5e767d7bcf0c7576bb90866d9
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php
@@ -22,6 +22,7 @@
use function bovigo\assert\assertTrue;
use function bovigo\assert\expect;
use function bovigo\assert\predicate\equals;
use function bovigo\assert\predicate\isNotEqualTo;
use function bovigo\assert\predicate\isExistingDirectory;
use function bovigo\assert\predicate\isExistingFile;
use function bovigo\assert\predicate\isNonExistingDirectory;
@@ -722,4 +723,15 @@ public function urlIsUpdatedAfterMove(): void
assertTrue(rename($this->fileInSubdir->url(), $baz3URL));
assertThat($this->fileInSubdir->url(), equals($baz3URL));
}
/**
* @test
*/
public function fileCopy()
{
$baz3URL = vfsStream::url('root/baz3');
assertTrue(copy($this->fileInSubdir->url(), $baz3URL));
assertTrue($this->root->hasChild('baz3'));
assertThat($baz3URL, isNotEqualTo($this->fileInSubdir->url()));
}
}

0 comments on commit 227695a

Please sign in to comment.
You can’t perform that action at this time.