@@ -327,7 +327,7 @@ public function testStoreByteExceptionWhileInsertingRecord()
327327 $ collection ->insert ($ document );
328328
329329 $ 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/ ' );
331331 $ this ->expectExceptionCode (11000 );
332332
333333 $ collection ->storeBytes ('foo ' , ['_id ' => $ id ]);
@@ -342,7 +342,7 @@ public function testStoreByteExceptionWhileInsertingChunks()
342342 $ collection ->chunks ->insert ($ document );
343343
344344 $ 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/ ' );
346346 $ this ->expectExceptionCode (11000 );
347347
348348 $ collection ->storeBytes ('foo ' );
@@ -357,7 +357,7 @@ public function testStoreFileExceptionWhileInsertingRecord()
357357 $ collection ->insert ($ document );
358358
359359 $ 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/ ' );
361361 $ this ->expectExceptionCode (11000 );
362362
363363 $ collection ->storeFile (__FILE__ , ['_id ' => $ id ]);
@@ -372,7 +372,7 @@ public function testStoreFileExceptionWhileInsertingChunks()
372372 $ collection ->chunks ->insert ($ document );
373373
374374 $ 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/ ' );
376376 $ this ->expectExceptionCode (11000 );
377377
378378 $ collection ->storeFile (__FILE__ );
@@ -387,7 +387,7 @@ public function testStoreFileExceptionWhileUpdatingFileRecord()
387387 $ collection ->insert ($ document );
388388
389389 $ 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/ ' );
391391 $ this ->expectExceptionCode (11000 );
392392
393393 $ collection ->storeFile (fopen (__FILE__ , 'r ' ));
0 commit comments