Differential D15006 Diff 36250 src/applications/project/remarkup/__tests__/ProjectRemarkupRuleTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/remarkup/__tests__/ProjectRemarkupRuleTestCase.php
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | $cases = array( | ||||
'ref' => array( | 'ref' => array( | ||||
array( | array( | ||||
'offset' => 10, | 'offset' => 10, | ||||
'id' => 'urgent', | 'id' => 'urgent', | ||||
), | ), | ||||
), | ), | ||||
), | ), | ||||
'**#orbital**' => array( | |||||
'embed' => array(), | |||||
'ref' => array( | |||||
array( | |||||
'offset' => 3, | |||||
'id' => 'orbital', | |||||
), | |||||
), | |||||
), | |||||
); | ); | ||||
foreach ($cases as $input => $expect) { | foreach ($cases as $input => $expect) { | ||||
$rule = new ProjectRemarkupRule(); | $rule = new ProjectRemarkupRule(); | ||||
$matches = $rule->extractReferences($input); | $matches = $rule->extractReferences($input); | ||||
$this->assertEqual($expect, $matches, $input); | $this->assertEqual($expect, $matches, $input); | ||||
} | } | ||||
} | } | ||||
} | } |