diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php index a241a31e9496889f3b81828a365283a6e59a39f6..346b5b7dd4f6710eaa662540276f6729812706e4 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/UrlTest.php @@ -336,4 +336,153 @@ function testExternalUrls() { $result = url($url, array('query' => $query)); $this->assertEqual($url . '&' . http_build_query($query, '', '&'), $result, 'External URL query string can be extended with a custom query string in $options.'); } + + /** + * Tests the variable processing within l(). + */ + function testLStructure() { + $options = array('render' => FALSE); + + // Build some $texts to check. + $texts = array( + array( + 'input' => 'foo', + 'input_name' => 'plain text', + 'expected_sanitized' => 'foo', + 'expected_unsanitized' => 'foo', + ), + array( + 'input' => '