Contao\Input::resetCache PHP Method

resetCache() public static method

Reset the internal cache
public static resetCache ( )
    public static function resetCache()
    {
        static::$arrCache = array();
    }

Usage Example

Example #1
0
 /**
  * Tests the getPost() method.
  *
  * @dataProvider postProvider
  */
 public function testGetPost($key, $input, $value, $expected)
 {
     $widget = $this->getMock('Contao\\Widget');
     $class = new \ReflectionClass('Contao\\Widget');
     $method = $class->getMethod('getPost');
     $method->setAccessible(true);
     $_POST[$input] = $value;
     Input::resetCache();
     Input::initialize();
     $this->assertEquals($expected, $method->invoke($widget, $key));
 }
All Usage Examples Of Contao\Input::resetCache