@@ -45,7 +45,7 @@ public function testErrorMysqli()
4545 }
4646
4747 $ this ->expectException (\Exception::class);
48- $ this ->expectExceptionMessageRegExp ('/[Missing configuration details to connect to database]/ ' );
48+ $ this ->expectExceptionMessageMatches ('/[Missing configuration details to connect to database]/ ' );
4949 $ settings = Config::initialize ('mysqli ' , [self ::TEST_DB_USER , self ::TEST_DB_PASSWORD ]);
5050 }
5151
@@ -88,7 +88,7 @@ public function testErrorPdo()
8888
8989 $ dsn = 'mysql:host= ' . self ::TEST_DB_HOST . ';dbname= ' . self ::TEST_DB_NAME . ';port=3306 ' ;
9090 $ this ->expectException (\Exception::class);
91- $ this ->expectExceptionMessageRegExp ('/[Missing configuration details to connect to database]/ ' );
91+ $ this ->expectExceptionMessageMatches ('/[Missing configuration details to connect to database]/ ' );
9292 $ settings = Config::initialize ('pdo ' , [$ dsn ]);
9393 }
9494
@@ -102,7 +102,7 @@ public function test__callPdo()
102102
103103 $ dsn = 'mysql:host= ' . self ::TEST_DB_HOST . ';dbname= ' . self ::TEST_DB_NAME . ';port=3306 ' ;
104104 $ this ->expectException (\Exception::class);
105- $ this ->expectExceptionMessageRegExp ('/[does not exist]/ ' );
105+ $ this ->expectExceptionMessageMatches ('/[does not exist]/ ' );
106106 $ settings = new Config ('pdo ' , [$ dsn , self ::TEST_DB_USER , self ::TEST_DB_PASSWORD ]);
107107 $ settings ->getNotAnProperty ();
108108 }
@@ -145,7 +145,7 @@ public function testErrorPgsql()
145145 }
146146
147147 $ this ->expectException (\Exception::class);
148- $ this ->expectExceptionMessageRegExp ('/[Missing configuration details to connect to database]/ ' );
148+ $ this ->expectExceptionMessageMatches ('/[Missing configuration details to connect to database]/ ' );
149149 $ settings = Config::initialize ('pgsql ' , [self ::TEST_DB_USER , self ::TEST_DB_PASSWORD ]);
150150 }
151151
@@ -185,7 +185,7 @@ public function testErrorSqlsrv()
185185 }
186186
187187 $ this ->expectException (\Exception::class);
188- $ this ->expectExceptionMessageRegExp ('/[Missing configuration details to connect to database]/ ' );
188+ $ this ->expectExceptionMessageMatches ('/[Missing configuration details to connect to database]/ ' );
189189 $ settings = new Config ('sqlsrv ' , [self ::TEST_DB_USER , self ::TEST_DB_PASSWORD ]);
190190 }
191191
@@ -224,21 +224,21 @@ public function testErrorSqlite3()
224224 }
225225
226226 $ this ->expectException (\Exception::class);
227- $ this ->expectExceptionMessageRegExp ('/[Missing configuration details to connect to database]/ ' );
227+ $ this ->expectExceptionMessageMatches ('/[Missing configuration details to connect to database]/ ' );
228228 $ settings = new Config ('sqlite3 ' , [self ::TEST_SQLITE_DB_DIR ]);
229229 }
230230
231231 public function test_construct ()
232232 {
233233 $ this ->expectException (\Exception::class);
234- $ this ->expectExceptionMessageRegExp ('/[Missing configuration details to connect to database]/ ' );
234+ $ this ->expectExceptionMessageMatches ('/[Missing configuration details to connect to database]/ ' );
235235 $ settings = new Config ('' , [self ::TEST_DB_USER , self ::TEST_DB_PASSWORD , self ::TEST_DB_NAME ]);
236236 }
237237
238238 public function test_constructArgs ()
239239 {
240240 $ this ->expectException (\Exception::class);
241- $ this ->expectExceptionMessageRegExp ('/[Missing configuration details to connect to database]/ ' );
241+ $ this ->expectExceptionMessageMatches ('/[Missing configuration details to connect to database]/ ' );
242242 $ settings = new Config ('mysqli ' );
243243 }
244244}
0 commit comments