Example #1
0
 /**
  * Values and definitions in-system parameter handling.
  * Options set to expect non-raw values.
  *
  * @return array
  */
 private function getTypedParams()
 {
     $params = array('awesome' => true, 'howmuch' => '42', 'float' => 4.2, 'page' => 'Ohi there!', 'Text' => 'foo bar baz o_O', 'text1 ' => 'foo bar baz o_O', ' text2' => 'foo bar baz o_O');
     $definitions = array('awesome' => array('type' => 'boolean'), 'howmuch' => array('type' => 'integer', 'default' => 9001), 'float' => array('type' => 'float', 'lowerbound' => 9001, 'default' => 9000.1), 'page' => array('type' => 'string', 'hastoexist' => false), 'text' => array('default' => 'some text'), 'text1' => array('default' => 'some text'), 'text2' => array('default' => 'some text'));
     $options = new Options();
     $options->setRawStringInputs(false);
     $options->setLowercaseNames(false);
     $options->setTrimNames(false);
     $expected = array('awesome' => true, 'howmuch' => 9001, 'float' => 9000.1, 'page' => 'Ohi there!', 'text' => 'some text', 'text1' => 'some text', 'text2' => 'some text');
     return array($params, $definitions, $options, $expected);
 }