aboutsummaryrefslogtreecommitdiff
path: root/mod/thewire/tests
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 15:23:08 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 15:23:08 +0000
commit1f3befaf97c2840dbd4ecadd8cc62bf838d32a45 (patch)
tree5d3a51da5da333d9f0d721c23525c9f5b28ae200 /mod/thewire/tests
parentf48bd5099f033cc148f9c1e3f781f8c932bda891 (diff)
downloadelgg-1f3befaf97c2840dbd4ecadd8cc62bf838d32a45.tar.gz
elgg-1f3befaf97c2840dbd4ecadd8cc62bf838d32a45.tar.bz2
standardized thewire plugin
git-svn-id: http://code.elgg.org/elgg/trunk@8841 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/thewire/tests')
-rw-r--r--mod/thewire/tests/regex.php24
1 files changed, 24 insertions, 0 deletions
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 "<a href=\"$url\">@$username</a>";
}
+ /**
+ * 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 "<a href=\"$url\">#$tag</a>";
}
+ /**
+ * Get a link for an email address mailto
+ *
+ * @param string $address Email address
+ * @return string
+ */
protected function getEmailLink($address) {
return "<a href=\"mailto:$address\">$address</a>";
}
+ /**
+ * Get the html for a link
+ *
+ * @param string $address URL
+ * @return string
+ */
protected function getLink($address) {
return parse_urls($address);
}