1 locale.test | LocaleUrlRewritingTest::testUrlRewritingEdgeCases() |
Check that disabled or non-installed languages are not considered.
File
- core/
modules/ locale/ tests/ locale.test, line 2411 - Tests for locale.module.
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->langcode = $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');
}