Skip to content

Commit f5e24dd

Browse files
committed
Fix tests after percentage change in dropzone implementation
1 parent a979029 commit f5e24dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/Handler/DropZoneUploadHandlerTest.php

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public function testInitWithoutRequestData()
2626

2727
$this->assertEquals(1, $contentRange->getTotalChunks());
2828
$this->assertEquals(1, $contentRange->getCurrentChunk());
29+
$this->assertEquals(0, $contentRange->getPercentageDone());
30+
$contentRange->setPercentageDone(100);
2931
$this->assertEquals(100, $contentRange->getPercentageDone());
3032
$this->assertFalse($contentRange->isChunkedUpload());
3133
}
@@ -75,6 +77,8 @@ public function testValidChunkRequest()
7577

7678
$this->assertEquals(2, $contentRange->getTotalChunks());
7779
$this->assertEquals(1, $contentRange->getCurrentChunk());
80+
$this->assertEquals(0, $contentRange->getPercentageDone());
81+
$contentRange->setPercentageDone(50);
7882
$this->assertEquals(50, $contentRange->getPercentageDone());
7983
$this->assertTrue($contentRange->isChunkedUpload());
8084
$this->assertTrue($contentRange->isFirstChunk());
@@ -93,6 +97,8 @@ public function testValidChunkFinishRequest()
9397

9498
$this->assertEquals(2, $contentRange->getTotalChunks());
9599
$this->assertEquals(2, $contentRange->getCurrentChunk());
100+
$this->assertEquals(0, $contentRange->getPercentageDone());
101+
$contentRange->setPercentageDone(100);
96102
$this->assertEquals(100, $contentRange->getPercentageDone());
97103
$this->assertTrue($contentRange->isChunkedUpload());
98104
$this->assertFalse($contentRange->isFirstChunk());

0 commit comments

Comments
 (0)