@@ -327,7 +327,7 @@ public function testStoreByteExceptionWhileInsertingRecord()
327
327
$ collection ->insert ($ document );
328
328
329
329
$ this ->expectException (\MongoGridFSException::class);
330
- $ this ->expectExceptionMessageRegExp ('/Could not store file:.* E11000 duplicate key error .* mongo-php-adapter\.fs\.files/ ' );
330
+ $ this ->expectErrorMessageMatches ('/Could not store file:.* E11000 duplicate key error .* mongo-php-adapter\.fs\.files/ ' );
331
331
$ this ->expectExceptionCode (11000 );
332
332
333
333
$ collection ->storeBytes ('foo ' , ['_id ' => $ id ]);
@@ -342,7 +342,7 @@ public function testStoreByteExceptionWhileInsertingChunks()
342
342
$ collection ->chunks ->insert ($ document );
343
343
344
344
$ this ->expectException (\MongoGridFSException::class);
345
- $ this ->expectExceptionMessageRegExp ('/Could not store file:.* E11000 duplicate key error .* mongo-php-adapter\.fs\.chunks/ ' );
345
+ $ this ->expectErrorMessageMatches ('/Could not store file:.* E11000 duplicate key error .* mongo-php-adapter\.fs\.chunks/ ' );
346
346
$ this ->expectExceptionCode (11000 );
347
347
348
348
$ collection ->storeBytes ('foo ' );
@@ -357,7 +357,7 @@ public function testStoreFileExceptionWhileInsertingRecord()
357
357
$ collection ->insert ($ document );
358
358
359
359
$ this ->expectException (\MongoGridFSException::class);
360
- $ this ->expectExceptionMessageRegExp ('/Could not store file:.* E11000 duplicate key error .* mongo-php-adapter\.fs\.files/ ' );
360
+ $ this ->expectErrorMessageMatches ('/Could not store file:.* E11000 duplicate key error .* mongo-php-adapter\.fs\.files/ ' );
361
361
$ this ->expectExceptionCode (11000 );
362
362
363
363
$ collection ->storeFile (__FILE__ , ['_id ' => $ id ]);
@@ -372,7 +372,7 @@ public function testStoreFileExceptionWhileInsertingChunks()
372
372
$ collection ->chunks ->insert ($ document );
373
373
374
374
$ this ->expectException (\MongoGridFSException::class);
375
- $ this ->expectExceptionMessageRegExp ('/Could not store file:.* E11000 duplicate key error .* mongo-php-adapter\.fs\.chunks/ ' );
375
+ $ this ->expectErrorMessageMatches ('/Could not store file:.* E11000 duplicate key error .* mongo-php-adapter\.fs\.chunks/ ' );
376
376
$ this ->expectExceptionCode (11000 );
377
377
378
378
$ collection ->storeFile (__FILE__ );
@@ -387,7 +387,7 @@ public function testStoreFileExceptionWhileUpdatingFileRecord()
387
387
$ collection ->insert ($ document );
388
388
389
389
$ this ->expectException (\MongoGridFSException::class);
390
- $ this ->expectExceptionMessageRegExp ('/Could not store file:.* E11000 duplicate key error .* mongo-php-adapter\.fs\.files/ ' );
390
+ $ this ->expectErrorMessageMatches ('/Could not store file:.* E11000 duplicate key error .* mongo-php-adapter\.fs\.files/ ' );
391
391
$ this ->expectExceptionCode (11000 );
392
392
393
393
$ collection ->storeFile (fopen (__FILE__ , 'r ' ));
0 commit comments