]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/php/Nominatim/DebugTest.php
add tests for migration
[nominatim.git] / test / php / Nominatim / DebugTest.php
index 6e0c25f3a22a150b4b4838c5ffeaba03713f09e5..09860914af4830fb348dba8422d8d0262b0e2d59 100644 (file)
@@ -2,19 +2,23 @@
 
 namespace Nominatim;
 
-use Exception;
+require_once(CONST_LibDir.'/DebugHtml.php');
 
-require_once('../../lib/DebugHtml.php');
-
-class DebugTest extends \PHPUnit_Framework_TestCase
+class DebugTest extends \PHPUnit\Framework\TestCase
 {
-    protected function setUp()
+
+    protected function setUp(): void
     {
-        $this->oWithDebuginfo = $this->getMock(Geocode::class, array('debugInfo'));
+        $this->oWithDebuginfo = $this->getMockBuilder(\GeococdeMock::class)
+                                    ->setMethods(array('debugInfo'))
+                                    ->getMock();
         $this->oWithDebuginfo->method('debugInfo')
                   ->willReturn(array('key1' => 'val1', 'key2' => 'val2', 'key3' => 'val3'));
 
-        $this->oWithToString = $this->getMock(Geocode::class, array('__toString'));
+
+        $this->oWithToString = $this->getMockBuilder(\SomeMock::class)
+                                    ->setMethods(array('__toString'))
+                                    ->getMock();
         $this->oWithToString->method('__toString')->willReturn('me as string');
     }