3 final class ProjectRemarkupRuleTestCase
extends PhabricatorTestCase
{
5 public function testProjectObjectRemarkup() {
7 'I like #ducks.' => array(
16 'We should make a post on #blog.example.com tomorrow.' => array(
21 'id' => 'blog.example.com',
25 'We should make a post on #blog.example.com.' => array(
30 'id' => 'blog.example.com',
52 '#security#123' => array(
63 // Don't match a terminal parenthesis. This fixes these constructs in
65 'There is some documentation (see #guides).' => array(
75 // Don't match internal parentheses either. This makes the terminal
76 // parenthesis behavior less arbitrary (otherwise, we match open
77 // parentheses but not closing parentheses, which is surprising).
98 'Is this #urgent?' => array(
108 'This is "#urgent".' => array(
118 "This is '#urgent'." => array(
128 '**#orbital**' => array(
140 foreach ($cases as $input => $expect) {
141 $rule = new ProjectRemarkupRule();
142 $matches = $rule->extractReferences($input);
143 $this->assertEqual($expect, $matches, $input);