Skip to content

Commit 3ca236e

Browse files
committed
Invert enable/disable MD5 tests
1 parent 641cb75 commit 3ca236e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/GridFS/BucketFunctionalTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -793,22 +793,23 @@ public function testUploadingAnEmptyFile(): void
793793

794794
$expected = [
795795
'length' => 0,
796-
'md5' => 'd41d8cd98f00b204e9800998ecf8427e',
797796
];
798797

799798
$this->assertSameDocument($expected, $fileDocument);
799+
$this->assertArrayNotHasKey('md5', $fileDocument);
800800
}
801801

802-
public function testDisableMD5(): void
802+
public function testEnableMD5(): void
803803
{
804-
$options = ['disableMD5' => true];
804+
$options = ['disableMD5' => false];
805805
$id = $this->bucket->uploadFromStream('filename', $this->createStream('data'), $options);
806806

807807
$fileDocument = $this->filesCollection->findOne(
808808
['_id' => $id],
809809
);
810810

811-
$this->assertArrayNotHasKey('md5', $fileDocument);
811+
$this->assertArrayHasKey('md5', $fileDocument);
812+
$this->assertSame('8d777f385d3dfec8815d20f7496026dc', $fileDocument['md5']);
812813
}
813814

814815
public function testDisableMD5OptionInConstructor(): void

0 commit comments

Comments
 (0)