[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/differential/parser/__tests__/ -> DifferentialCustomFieldDependsOnParserTestCase.php (source)

   1  <?php
   2  
   3  final class DifferentialCustomFieldDependsOnParserTestCase
   4    extends PhabricatorTestCase {
   5  
   6    public function testParser() {
   7      $map = array(
   8        'quack quack quack' => array(),
   9        'D123' => array(),
  10        'depends on D123' => array(
  11          array(
  12            'match' => 'depends on D123',
  13            'prefix' => 'depends on',
  14            'infix' => '',
  15            'monograms' => array('D123'),
  16            'suffix' => '',
  17            'offset' => 0,
  18          ),
  19        ),
  20        'depends on D123.' => array(
  21          array(
  22            'match' => 'depends on D123',
  23            'prefix' => 'depends on',
  24            'infix' => '',
  25            'monograms' => array('D123'),
  26            'suffix' => '',
  27            'offset' => 0,
  28          ),
  29        ),
  30        'depends on D123, d124' => array(
  31          array(
  32            'match' => 'depends on D123, d124',
  33            'prefix' => 'depends on',
  34            'infix' => '',
  35            'monograms' => array('D123', 'd124'),
  36            'suffix' => '',
  37            'offset' => 0,
  38          ),
  39        ),
  40        'depends on rev D123' => array(
  41          array(
  42            'match' => 'depends on rev D123',
  43            'prefix' => 'depends on',
  44            'infix' => 'rev',
  45            'monograms' => array('D123'),
  46            'suffix' => '',
  47            'offset' => 0,
  48          ),
  49        ),
  50        'depends on duck' => array(
  51        ),
  52        'depends on D123abc' => array(
  53        ),
  54      );
  55  
  56      foreach ($map as $input => $expect) {
  57        $parser = new DifferentialCustomFieldDependsOnParser();
  58        $output = $parser->parseCorpus($input);
  59  
  60        $this->assertEqual($expect, $output, $input);
  61      }
  62    }
  63  
  64  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1