/**
  * testPrepareSource
  *
  * @return  void
  */
 public function testPrepareSource()
 {
     $_REQUEST['foo'] = 'bar';
     $instance = new Input();
     $instance->prepareSource($_REQUEST, true);
     $this->assertSame($_REQUEST, TestHelper::getValue($instance, 'data'));
     $instance->set('foo', 'baz');
     $this->assertEquals('baz', $instance->get('foo'));
 }
Beispiel #2
0
 /**
  * Gets a value from the input data.
  *
  * @param   string  $name     Name of the value to get.
  * @param   mixed   $default  Default value to return if variable does not exist.
  * @param   string  $filter   Filter to apply to the value.
  *
  * @return  mixed  The filtered input value.
  *
  * @since   2.0
  */
 public function get($name, $default = null, $filter = 'string')
 {
     return parent::get($name, $default, $filter);
 }