Skip to content

Commit

Permalink
Merge pull request #32109 from owncloud/stable10-acceptanceTestsChunk…
Browse files Browse the repository at this point in the history
…UploadImprovment

[stable10] calculate num of chunks in acceptance tests
  • Loading branch information
phil-davis authored Jul 20, 2018
2 parents 1774782 + f358cca commit bc98c34
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion tests/acceptance/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -1585,14 +1585,41 @@ public function userCreatesAFolder($user, $destination) {
*
* @return void
*/
public function userUploadsTheFollowingChunksUsingOldChunking($user, $total, $file, TableNode $chunkDetails) {
public function userUploadsTheFollowingTotalChunksUsingOldChunking(
$user, $total, $file, TableNode $chunkDetails
) {
foreach ($chunkDetails->getTable() as $chunkDetail) {
$chunkNumber = $chunkDetail[0];
$chunkContent = $chunkDetail[1];
$this->userUploadsChunkedFile($user, $chunkNumber, $total, $chunkContent, $file);
}
}

/**
* Old style chunking upload
*
* @When user :user uploads the following chunks to :file with old chunking and using the API
* @Given user :user has uploaded the following chunks to :file with old chunking and using the API
*
* @param string $user
* @param string $file
* @param TableNode $chunkDetails table of 2 columns, chunk number and chunk
* content without column headings, e.g.
* | 1 | first data |
* | 2 | followed by second data |
* Chunks may be numbered out-of-order if desired.
*
* @return void
*/
public function userUploadsTheFollowingChunksUsingOldChunking(
$user, $file, TableNode $chunkDetails
) {
$total = \count($chunkDetails->getRows());
$this->userUploadsTheFollowingTotalChunksUsingOldChunking(
$user, $total, $file, $chunkDetails
);
}

/**
* Old style chunking upload
*
Expand Down

0 comments on commit bc98c34

Please sign in to comment.