function LocaleUrlRewritingTest::testUrlRewritingEdgeCases
Check that disabled or non-installed languages are not considered.
File
-
modules/
locale/ locale.test, line 2677
Class
- LocaleUrlRewritingTest
- Test that URL rewriting works as expected.
Code
function testUrlRewritingEdgeCases() {
// Check URL rewriting with a disabled language.
$languages = language_list();
$this->checkUrl($languages['it'], 'Path language is ignored if language is disabled.', 'URL language negotiation does not work with disabled languages');
// Check URL rewriting with a non-installed language.
$non_existing = language_default();
$non_existing->language = $this->randomName();
$non_existing->prefix = $this->randomName();
$this->checkUrl($non_existing, 'Path language is ignored if language is not installed.', 'URL language negotiation does not work with non-installed languages');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.