Skip to content
Snippets Groups Projects
Commit 62e93ffe authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Tests for SimpleSAML\Locale\Language::getLanguageParameterName().

parent ba50df73
No related branches found
No related tags found
No related merge requests found
......@@ -30,4 +30,23 @@ class LanguageTest extends \PHPUnit_Framework_TestCase
$_COOKIE['xyz'] = 'yy';
$this->assertEquals('yy', Language::getLanguageCookie());
}
/**
* Test SimpleSAML\Locale\Language::getLanguageParameterName().
*/
public function testGetLanguageParameterName()
{
// test for default configuration
$c = \SimpleSAML_Configuration::loadFromArray(array());
$l = new Language($c);
$this->assertEquals('language', $l->getLanguageParameterName());
// test for valid configuration
$c = \SimpleSAML_Configuration::loadFromArray(array(
'language.parameter.name' => 'xyz'
));
$l = new Language($c);
$this->assertEquals('xyz', $l->getLanguageParameterName());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment