public function testGetSet()
{
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage("Parameter 'val3' must be one of: foo, bar");
+
$oParams = new ParameterParser(array(
'val1' => 'foo',
'val2' => '',
$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'));
}
$this->assertTrue($oParams->hasSetAny(array('four')));
$this->assertTrue($oParams->hasSetAny(array('five')));
}
-}
\ No newline at end of file
+}