]> git.openstreetmap.org Git - nominatim.git/commitdiff
php unit: replace deprecated regex assert
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 7 Dec 2021 10:34:21 +0000 (11:34 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 7 Dec 2021 10:34:21 +0000 (11:34 +0100)
The regEx assertion has been renamed in PHPUnit 9.5
and causes deprecation warnings.

test/php/Nominatim/DatabaseErrorTest.php

index da15649347cc73ae293f83b6acbb1037614b4c42..6e70ac25d7cb5eeef1eaed359de671a147220ce3 100644 (file)
@@ -26,6 +26,6 @@ class DatabaseErrorTest extends \PHPUnit\Framework\TestCase
     public function testSqlObjectDump()
     {
         $oErr = new DatabaseError('Sql error', 123, null, array('one' => 'two'));
-        $this->assertRegExp('/two/', $oErr->getSqlDebugDump());
+        $this->assertStringContainsString('two', $oErr->getSqlDebugDump());
     }
 }