예제 #1
0
 /**
  * Router callback rule for appending the SSO logout variable to the URL.
  *
  * @param   JRouter  $router  Reference to the router object.
  * @param   JURI     $uri     Reference to the JURI object.
  *
  * @return  void
  *
  * @since   2.0
  */
 public static function logoutRouterRule(JRouter $router, JURI $uri)
 {
     $uri->setVar($router->getVar('ssologoutkey'), $router->getVar('ssologoutval'));
 }
예제 #2
0
 /**
  * @param   array   $preset   An associative array with variables
  * @param   string  $var      The name of the variable
  * @param   mixed   $value    The value of the variable
  * @param   boolean $create   If True, the variable will be created if it doesn't exist yet
  * @param   string  $expected Expected return value
  *
  * @dataProvider  casesVariables
  * @since         3.1
  */
 public function testSingleVariablesCanBeAddedAndOptionallyReplaceExistingVariables($preset, $var, $value, $create, $expected)
 {
     $this->object->setVars($preset, false);
     $this->object->setVar($var, $value, $create);
     $this->assertEquals($expected, $this->object->getVar($var));
 }
 /**
  * Tests the setVar method
  *
  * @param   array    $vars      An associative array with variables
  * @param   string   $var       The name of the variable
  * @param   mixed    $value     The value of the variable
  * @param   boolean  $create    If True, the variable will be created if it doesn't exist yet
  * @param   string   $expected  Expected return value
  *
  * @return  void
  *
  * @dataProvider  casesSetVar
  * @since         3.1
  */
 public function testSetVar($vars, $var, $value, $create, $expected)
 {
     $this->object->setVars($vars, false);
     $this->object->setVar($var, $value, $create);
     $this->assertEquals($this->object->getVar($var), $expected, __METHOD__ . ':' . __LINE__ . ': value is not expected');
 }