From 1f3befaf97c2840dbd4ecadd8cc62bf838d32a45 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 26 Mar 2011 15:23:08 +0000 Subject: standardized thewire plugin git-svn-id: http://code.elgg.org/elgg/trunk@8841 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/thewire/tests/regex.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'mod/thewire/tests/regex.php') diff --git a/mod/thewire/tests/regex.php b/mod/thewire/tests/regex.php index a1a432a20..f5487a422 100644 --- a/mod/thewire/tests/regex.php +++ b/mod/thewire/tests/regex.php @@ -38,22 +38,46 @@ class TheWireRegexTest extends ElggCoreUnitTest { parent::__destruct(); } + /** + * Get the link for a user's wire page + * + * @param string $username Username + * @return string + */ protected function getUserWireLink($username) { $url = "thewire/owner/$username"; $url = elgg_normalize_url($url); return "@$username"; } + /** + * Get the link for a hashtag page + * + * @param string $tag Tag string + * @return string + */ protected function getHashtagLink($tag) { $url = "thewire/tag/$tag"; $url = elgg_normalize_url($url); return "#$tag"; } + /** + * Get a link for an email address mailto + * + * @param string $address Email address + * @return string + */ protected function getEmailLink($address) { return "$address"; } + /** + * Get the html for a link + * + * @param string $address URL + * @return string + */ protected function getLink($address) { return parse_urls($address); } -- cgit v1.2.3