? 207024-forum-taxonomy-v2.patch
? 229660-contact-theme-username-D7_0.patch
? 696_access_log_filter_40.patch
? 696_access_log_filter_41.patch
? filter_check_markup_5.patch
? filter_check_markup_6.patch
? jsomers_353847_
? jsomers_353847_3_0.patch
? jsomers_353847_4.patch
? jsomers_353847_5.patch
? l_class_test_2_1.patch
? l_class_test_2_2.patch
? l_class_test_3.patch
? lock-251792-71-D6.patch
? modules/contact/.contact.pages.inc.swp
? modules/simpletest/tests/.common.test.rej.swp
? modules/simpletest/tests/.common.test.swp
? 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.36
diff -u -p -r1.36 common.test
--- modules/simpletest/tests/common.test	27 Apr 2009 20:19:38 -0000	1.36
+++ modules/simpletest/tests/common.test	29 Apr 2009 21:19:46 -0000
@@ -967,3 +967,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'));
+  }
+}
+
