File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -674,7 +674,20 @@ public function testDisableMD5(): void
674
674
{
675
675
$ options = ['disableMD5 ' => true ];
676
676
$ id = $ this ->bucket ->uploadFromStream ('filename ' , $ this ->createStream ('data ' ), $ options );
677
- $ this ->assertCollectionCount ($ this ->filesCollection , 1 );
677
+
678
+ $ fileDocument = $ this ->filesCollection ->findOne (
679
+ ['_id ' => $ id ]
680
+ );
681
+
682
+ $ this ->assertArrayNotHasKey ('md5 ' , $ fileDocument );
683
+ }
684
+
685
+ public function testDisableMD5OptionInConstructor (): void
686
+ {
687
+ $ options = ['disableMD5 ' => true ];
688
+
689
+ $ this ->bucket = new Bucket ($ this ->manager , $ this ->getDatabaseName (), $ options );
690
+ $ id = $ this ->bucket ->uploadFromStream ('filename ' , $ this ->createStream ('data ' ));
678
691
679
692
$ fileDocument = $ this ->filesCollection ->findOne (
680
693
['_id ' => $ id ]
You can’t perform that action at this time.
0 commit comments