X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/47258f40ea77b9d73c7bfcca1a3489d9adeb30f3..ab54a4b8d7ba75f7a1ecd18de34bbce5af291b5b:/test/php/Nominatim/ParameterParserTest.php diff --git a/test/php/Nominatim/ParameterParserTest.php b/test/php/Nominatim/ParameterParserTest.php index 78739534..4265cffb 100644 --- a/test/php/Nominatim/ParameterParserTest.php +++ b/test/php/Nominatim/ParameterParserTest.php @@ -115,7 +115,7 @@ class ParameterParserTest extends \PHPUnit_Framework_TestCase $this->assertSame('default', $oParams->getString('non-exists', 'default')); $this->assertSame('abc', $oParams->getString('str1')); $this->assertSame(false, $oParams->getStringList('str2')); - $this->assertSame(false, $oParams->getStringList('str3')); // FIXME: should be 0 instead? + $this->assertSame(false, $oParams->getStringList('str3')); // sadly PHP magic treats 0 as false when returned } @@ -128,7 +128,6 @@ class ParameterParserTest extends \PHPUnit_Framework_TestCase ]); $this->assertSame(false, $oParams->getSet('non-exists', ['foo', 'bar'])); - // FIXME: unclear if the default value has to be part of the set $this->assertSame('default', $oParams->getSet('non-exists', ['foo', 'bar'], 'default')); $this->assertSame('foo', $oParams->getSet('val1', ['foo', 'bar'])); @@ -155,8 +154,7 @@ class ParameterParserTest extends \PHPUnit_Framework_TestCase $this->assertSame(false, $oParams->getStringList('non-exists')); $this->assertSame(['a', 'b'], $oParams->getStringList('non-exists', ['a', 'b'])); - // FIXME: unclear if empty string items should be removed - $this->assertSame(['', 'a', 'b', 'c', '', 'c', 'd'], $oParams->getStringList('list1')); + $this->assertSame(['a', 'b', 'c', 'c', 'd'], $oParams->getStringList('list1')); $this->assertSame(['a'], $oParams->getStringList('list2')); $this->assertSame(false, $oParams->getStringList('list3')); $this->assertSame(false, $oParams->getStringList('list4'));