diff options
author | Joas Schilling <coding@schilljs.com> | 2017-03-17 10:05:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-17 10:05:25 +0100 |
commit | 5a8129f8ef43ac0b0cde58fd81a7b379dfbb26b4 (patch) | |
tree | f92dc855e06e61aae474082461853e5a034ee52f /apps/dav/tests/unit | |
parent | d504408efd23378140ef7d1491dae555da16e9c4 (diff) | |
parent | 075a6065141e2412454699ca8e7fca558c5b6b4f (diff) | |
download | nextcloud-server-5a8129f8ef43ac0b0cde58fd81a7b379dfbb26b4.tar.gz nextcloud-server-5a8129f8ef43ac0b0cde58fd81a7b379dfbb26b4.zip |
Merge pull request #3886 from nextcloud/downstream-26995
Chunking NG: Assemble in natural sort order of files
Diffstat (limited to 'apps/dav/tests/unit')
-rw-r--r-- | apps/dav/tests/unit/Upload/AssemblyStreamTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php index 66aea40ef22..69ee52299e9 100644 --- a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php +++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php @@ -52,6 +52,15 @@ class AssemblyStreamTest extends \Test\TestCase { function providesNodes() { $data8k = $this->makeData(8192); $dataLess8k = $this->makeData(8191); + + $tonofnodes = []; + $tonofdata = ""; + for ($i = 0; $i < 101; $i++) { + $thisdata = rand(0,100); // variable length and content + $tonofdata .= $thisdata; + array_push($tonofnodes, $this->buildNode($i,$thisdata)); + } + return[ 'one node zero bytes' => [ '', [ @@ -90,6 +99,9 @@ class AssemblyStreamTest extends \Test\TestCase { $this->buildNode('1', $data8k . 'X'), $this->buildNode('0', $data8k) ]], + 'a ton of nodes' => [ + $tonofdata, $tonofnodes + ] ]; } |