X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/943e5fe6997f71709d344a73363021ffcefe3539..ccf119206d56a024f21cde36c729e4b7da4283d1:/test/php/Nominatim/ParameterParserTest.php diff --git a/test/php/Nominatim/ParameterParserTest.php b/test/php/Nominatim/ParameterParserTest.php index 1488c987..7381bdf8 100644 --- a/test/php/Nominatim/ParameterParserTest.php +++ b/test/php/Nominatim/ParameterParserTest.php @@ -137,6 +137,9 @@ class ParameterParserTest extends \PHPUnit\Framework\TestCase public function testGetSet() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage("Parameter 'val3' must be one of: foo, bar"); + $oParams = new ParameterParser(array( 'val1' => 'foo', 'val2' => '', @@ -148,7 +151,7 @@ class ParameterParserTest extends \PHPUnit\Framework\TestCase $this->assertSame('foo', $oParams->getSet('val1', array('foo', 'bar'))); $this->assertSame(false, $oParams->getSet('val2', array('foo', 'bar'))); - $this->assertSame(0, $oParams->getSet('val3', array('foo', 'bar'))); + $oParams->getSet('val3', array('foo', 'bar')); }