+ foreach ( $files as $path ) {
+ $status = $this->prepare( [ 'dir' => dirname( $path ) ] );
+ $this->assertGoodStatus( $status,
+ "Preparing $path succeeded without warnings ($backendName)." );
+ }
+
+ foreach ( array_chunk( $createOps, $batchSize ) as $batchOps ) {
+ $this->assertGoodStatus(
+ $this->backend->doQuickOperations( $batchOps ),
+ "Creation of source files succeeded ($backendName)."
+ );
+ }
+ foreach ( $files as $file ) {
+ $this->assertTrue(
+ $this->backend->fileExists( [ 'src' => $file ] ),
+ "File $file exists."
+ );
+ }
+
+ foreach ( array_chunk( $copyOps, $batchSize ) as $batchOps ) {
+ $this->assertGoodStatus(
+ $this->backend->doQuickOperations( $batchOps ),
+ "Quick copy of source files succeeded ($backendName)."
+ );
+ }
+ foreach ( $files as $file ) {
+ $this->assertTrue(
+ $this->backend->fileExists( [ 'src' => "$file-2" ] ),
+ "File $file-2 exists."
+ );
+ }
+
+ foreach ( array_chunk( $moveOps, $batchSize ) as $batchOps ) {
+ $this->assertGoodStatus(
+ $this->backend->doQuickOperations( $batchOps ),
+ "Quick move of source files succeeded ($backendName)."
+ );
+ }
+ foreach ( $files as $file ) {
+ $this->assertTrue(
+ $this->backend->fileExists( [ 'src' => "$file-3" ] ),
+ "File $file-3 move in."
+ );
+ $this->assertFalse(
+ $this->backend->fileExists( [ 'src' => "$file-2" ] ),
+ "File $file-2 moved away."
+ );
+ }
+
+ foreach ( array_chunk( $overSelfOps, $batchSize ) as $batchOps ) {
+ $this->assertGoodStatus(
+ $this->backend->doQuickOperations( $batchOps ),
+ "Quick copy/move of source files over themselves succeeded ($backendName)."
+ );
+ }
+ foreach ( $files as $file ) {
+ $this->assertTrue(
+ $this->backend->fileExists( [ 'src' => $file ] ),
+ "File $file still exists after copy/move over self."
+ );
+ }
+
+ foreach ( array_chunk( $deleteOps, $batchSize ) as $batchOps ) {
+ $this->assertGoodStatus(
+ $this->backend->doQuickOperations( $batchOps ),
+ "Quick deletion of source files succeeded ($backendName)."
+ );
+ }
+ foreach ( $files as $file ) {
+ $this->assertFalse( $this->backend->fileExists( [ 'src' => $file ] ),
+ "File $file purged." );
+ $this->assertFalse( $this->backend->fileExists( [ 'src' => "$file-3" ] ),
+ "File $file-3 purged." );
+ }
+ }
+
+ function provider_quickOperations() {