]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/php/Nominatim/AddressDetailsTest.php
tests: always create the config file
[nominatim.git] / test / php / Nominatim / AddressDetailsTest.php
index e7b3a3f85ab5cd13376e0974fe21348ca2e86e04..32f4f457d5676048181e0b2d1df2f81c7b96309f 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace Nominatim;
 
-require_once(CONST_BasePath.'/lib/init-website.php');
-require_once(CONST_BasePath.'/lib/AddressDetails.php');
+require_once(CONST_LibDir.'/init-website.php');
+require_once(CONST_LibDir.'/AddressDetails.php');
 
 
 class AddressDetailsTest extends \PHPUnit\Framework\TestCase
@@ -30,7 +30,7 @@ class AddressDetailsTest extends \PHPUnit\Framework\TestCase
         //
         // 5) copy&paste into file. Add commas between records
         //
-        $json = file_get_contents(CONST_BasePath.'/test/php/fixtures/address_details_10_downing_street.json');
+        $json = file_get_contents(CONST_DataDir.'/test/php/fixtures/address_details_10_downing_street.json');
         $data = json_decode($json, true);
 
         $this->oDbStub = $this->getMockBuilder(\DB::class)
@@ -70,7 +70,7 @@ class AddressDetailsTest extends \PHPUnit\Framework\TestCase
     {
         $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',