]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/php/Nominatim/AddressDetailsTest.php
use address rank for address forming when available
[nominatim.git] / test / php / Nominatim / AddressDetailsTest.php
index 62faf1a4b2d7caa27b0dd9cbcc819d65f2dc0457..4678911cdd5ec1e09255f581fb64416edb949ae3 100644 (file)
@@ -2,18 +2,14 @@
 
 namespace Nominatim;
 
 
 namespace Nominatim;
 
+require_once(CONST_BasePath.'/lib/init-website.php');
 require_once(CONST_BasePath.'/lib/AddressDetails.php');
 
 
 require_once(CONST_BasePath.'/lib/AddressDetails.php');
 
 
-function chksql($oSql, $sMsg = 'Database request failed')
-{
-    return $oSql;
-}
-
 class AddressDetailsTest extends \PHPUnit\Framework\TestCase
 {
 
 class AddressDetailsTest extends \PHPUnit\Framework\TestCase
 {
 
-    protected function setUp()
+    protected function setUp(): void
     {
         // How the fixture got created
         //
     {
         // How the fixture got created
         //
@@ -74,7 +70,7 @@ class AddressDetailsTest extends \PHPUnit\Framework\TestCase
     {
         $oAD = new AddressDetails($this->oDbStub, 194663412, 10, 'en');
         $expected = array(
     {
         $oAD = new AddressDetails($this->oDbStub, 194663412, 10, 'en');
         $expected = array(
-                     'attraction' => '10 Downing Street',
+                     'tourism' => '10 Downing Street',
                      'house_number' => '10',
                      'road' => 'Downing Street',
                      'neighbourhood' => 'St. James\'s',
                      'house_number' => '10',
                      'road' => 'Downing Street',
                      'neighbourhood' => 'St. James\'s',