Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / maniphest / field / parser / __tests__ / ManiphestCustomFieldStatusParserTestCase.php
blob5dc15673b9f24392bfa33ca12975960d4e35bbf1
1 <?php
3 final class ManiphestCustomFieldStatusParserTestCase
4 extends PhabricatorTestCase {
6 public function testParser() {
7 $map = array(
8 'quack quack quack' => array(),
9 'T123' => array(),
10 'Fixes T123' => array(
11 array(
12 'match' => 'Fixes T123',
13 'prefix' => 'Fixes',
14 'infix' => '',
15 'monograms' => array('T123'),
16 'suffix' => '',
17 'offset' => 0,
20 'Fixes T123, T124, and also some other bugs.' => array(
21 array(
22 'match' => 'Fixes T123, T124, ',
23 'prefix' => 'Fixes',
24 'infix' => '',
25 'monograms' => array('T123', 'T124'),
26 'suffix' => '',
27 'offset' => 0,
30 'Closes T1 as wontfix' => array(
31 array(
32 'match' => 'Closes T1 as wontfix',
33 'prefix' => 'Closes',
34 'infix' => '',
35 'monograms' => array('T1'),
36 'suffix' => 'as wontfix',
37 'offset' => 0,
40 'Fixes task T9' => array(
41 array(
42 'match' => 'Fixes task T9',
43 'prefix' => 'Fixes',
44 'infix' => 'task',
45 'monograms' => array('T9'),
46 'suffix' => '',
47 'offset' => 0,
50 'Fixes t2apps' => array(),
51 'fixes a bug' => array(),
52 'Prefixes T2' => array(),
53 'Reopens T123' => array(
54 array(
55 'match' => 'Reopens T123',
56 'prefix' => 'Reopens',
57 'infix' => '',
58 'monograms' => array('T123'),
59 'suffix' => '',
60 'offset' => 0,
63 'Fixes T123, T456, and T789.' => array(
64 array(
65 'match' => 'Fixes T123, T456, and T789',
66 'prefix' => 'Fixes',
67 'infix' => '',
68 'monograms' => array('T123', 'T456', 'T789'),
69 'suffix' => '',
70 'offset' => 0,
75 foreach ($map as $input => $expect) {
76 $parser = new ManiphestCustomFieldStatusParser();
77 $output = $parser->parseCorpus($input);
79 $this->assertEqual($expect, $output, $input);