3 final class ManiphestCustomFieldStatusParserTestCase
4 extends PhabricatorTestCase
{
6 public function testParser() {
8 'quack quack quack' => array(),
10 'Fixes T123' => array(
12 'match' => 'Fixes T123',
15 'monograms' => array('T123'),
20 'Fixes T123, T124, and also some other bugs.' => array(
22 'match' => 'Fixes T123, T124, ',
25 'monograms' => array('T123', 'T124'),
30 'Closes T1 as wontfix' => array(
32 'match' => 'Closes T1 as wontfix',
35 'monograms' => array('T1'),
36 'suffix' => 'as wontfix',
40 'Fixes task T9' => array(
42 'match' => 'Fixes task T9',
45 'monograms' => array('T9'),
50 'Fixes t2apps' => array(),
51 'fixes a bug' => array(),
52 'Prefixes T2' => array(),
53 'Reopens T123' => array(
55 'match' => 'Reopens T123',
56 'prefix' => 'Reopens',
58 'monograms' => array('T123'),
63 'Fixes T123, T456, and T789.' => array(
65 'match' => 'Fixes T123, T456, and T789',
68 'monograms' => array('T123', 'T456', 'T789'),
75 foreach ($map as $input => $expect) {
76 $parser = new ManiphestCustomFieldStatusParser();
77 $output = $parser->parseCorpus($input);
79 $this->assertEqual($expect, $output, $input);