Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.30
diff -u -r1.30 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	18 Aug 2008 19:25:52 -0000	1.30
+++ modules/simpletest/drupal_web_test_case.php	20 Aug 2008 23:45:34 -0000
@@ -1074,6 +1074,43 @@
   }
 
   /**
+   * Pass if a link with the specified label is found, and optional with the
+   * specified index.
+   *
+   * @param $label
+   *   Text between the anchor tags.
+   * @param $index
+   *   Link position counting from zero.
+   * @param $message
+   *   Message to display.
+   * @param $group
+   *   The group this message belongs to, defaults to 'Other'.
+   */
+  public function assertLink($label, $index = 0, $message = '', $group = 'Other') {
+    $links = $this->xpath('//a[text()="' . $label . '"]');
+    $message = ($message ?  $message : t('Link with label "!label" found.', array('!label' => $label)));
+    $this->assertTrue(isset($links[$index]), $message, $group);
+  }
+
+  /**
+   * Pass if a link with the specified label is not found.
+   *
+   * @param $label
+   *   Text between the anchor tags.
+   * @param $index
+   *   Link position counting from zero.
+   * @param $message
+   *   Message to display.
+   * @param $group
+   *   The group this message belongs to, defaults to 'Other'.
+   */
+  public function assertNoLink($label, $message = '', $group = 'Other') {
+    $links = $this->xpath('//a[text()="' . $label . '"]');
+    $message = ($message ?  $message : t('Link with label "!label" not found.', array('!label' => $label)));
+    $this->assertTrue(empty($links), $message, $group);
+  }
+
+  /**
    * Follows a link by name.
    *
    * Will click the first link found with this link text by default, or a
