Skip to content

Commit 4e48da0

Browse files
committed
Remove deprecated fields from tests
1 parent f90016a commit 4e48da0

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

UPGRADE-2.0.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ GridFS
1010

1111
```php
1212
$hash = hash_file('sha256', $filename);
13-
$bucket->openDownloadStream($fileId, ['metadata' => ['hash' => $hash]]);
13+
$bucket->openUploadStream($fileId, ['metadata' => ['hash' => $hash]]);
1414
```
1515

1616
* The fields `contentType` and `aliases` are no longer stored in the `files`
@@ -19,10 +19,10 @@ GridFS
1919

2020
**Before:**
2121
```php
22-
$bucket->openDownloadStream($fileId, ['contentType' => 'image/png']);
22+
$bucket->openUploadStream($fileId, ['contentType' => 'image/png']);
2323
```
2424

2525
**After:**
2626
```php
27-
$bucket->openDownloadStream($fileId, ['metadata' => ['contentType' => 'image/png']]);
27+
$bucket->openUploadStream($fileId, ['metadata' => ['contentType' => 'image/png']]);
2828
```

tests/UnifiedSpecTests/UnifiedSpecTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ class UnifiedSpecTest extends FunctionalTestCase
188188
'crud/db-aggregate-write-readPreference: Database-level aggregate with $merge includes read preference for 5.0+ server' => 'PHPLIB-1458',
189189
'crud/db-aggregate-write-readPreference: Database-level aggregate with $merge omits read preference for pre-5.0 server' => 'PHPLIB-1458',
190190
// GridFS deprecated fields are removed
191+
'gridfs/gridfs-upload-disableMD5: upload when length is 0 sans MD5' => 'Deprecated fields are removed',
192+
'gridfs/gridfs-upload-disableMD5: upload when length is 1 sans MD5' => 'Deprecated fields are removed',
191193
'gridfs/gridfs-upload: upload when contentType is provided' => 'Deprecated fields are removed',
192194
];
193195

tests/UnifiedSpecTests/Util.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ final class Util
134134
'delete' => ['id'],
135135
'downloadByName' => ['filename', 'revision'],
136136
'download' => ['id'],
137-
'uploadWithId' => ['id', 'filename', 'source', 'chunkSizeBytes', 'disableMD5', 'contentType', 'metadata'],
138-
'upload' => ['filename', 'source', 'chunkSizeBytes', 'disableMD5', 'contentType', 'metadata'],
137+
'uploadWithId' => ['id', 'filename', 'source', 'chunkSizeBytes', 'metadata'],
138+
'upload' => ['filename', 'source', 'chunkSizeBytes', 'metadata'],
139139
],
140140
];
141141

0 commit comments

Comments
 (0)