? 296115.patch.1
? 296115_2.patch
? l_class_test_2_0.patch
? l_class_test_2_1.patch
? node-access_2.patch
? node_access_test_1.patch
? php53_warnings_2.patch
? strstr_to_strpos_2.patch
? strstr_to_strpos_3.patch
? strstr_to_strpos_3.patch.1
? strstr_to_strpos_4.patch
? modules/system/.system.install.swp
? sites/default/296115_2.patch
? sites/default/files
? sites/default/settings.php
Index: modules/simpletest/tests/common.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/common.test,v
retrieving revision 1.22
diff -u -p -r1.22 common.test
--- modules/simpletest/tests/common.test	21 Jan 2009 14:22:32 -0000	1.22
+++ modules/simpletest/tests/common.test	21 Jan 2009 21:20:57 -0000
@@ -763,3 +763,36 @@ class DrupalErrorCollectionUnitTest exte
     }
   }
 }
+
+/**
+ * Test the l() function if the class is properly added.
+ */
+class DrupalLClassTestCase extends DrupalWebTestCase {
+  function getInfo() {
+    return array(
+        'name' => t('Drupal l() class test'),
+        'description'=> t("Performs test on Drupal's l() function class specifying mechanism."),
+        'group' => t('System'),
+        );
+  }
+
+  /**
+   * Tests for active class in l() function.
+   */
+  function testDrupalLActiveClass() {
+    $link_text = $this->randomName();
+    $link = l($link_text, $_GET['q']);
+    $this->assertEqual($link, '<a href="' . url($_GET['q']) . '" class="active">' . $link_text .
+        '</a>', t('Active class is present on the current page'));
+  }
+
+  /**
+   * Tests for custom class in l() function.
+   */
+  function testDrupalLClassPresent() {
+    $link_text = $this->randomName();
+    $link = l($link_text, $_GET['q'], array('attributes' => array('class' => 'class_set')));
+    $this->assertEqual($link, '<a href="' . url($_GET['q']) . '" class="class_set active">' .
+        $link_text . '</a>', t('Specified class is present on the current page'));
+  }
+}
