Skip to content

Instantly share code, notes, and snippets.

@tchrist
Created January 20, 2012 19:14
Show Gist options
  • Save tchrist/1649064 to your computer and use it in GitHub Desktop.
Save tchrist/1649064 to your computer and use it in GitHub Desktop.
$specifiedTag = 'foo';
$found = false;
$tags = $item->getHashTags();
$found = in_array($specifiedTags, $tags);
if(!$found) {
$comments = $item->getComments();
foreach($comments as $comment) {
$tags = $comment->getHashTags();
$found = in_array($specifiedTags, $tags)
if($found) {
break;
}
}
}
$this->assertTrue($found, "Hash tag $specifiedTag should be found in the feed item or comments");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment