[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/doorkeeper/bridge/__tests__/ -> DoorkeeperBridgeJIRATestCase.php (source)

   1  <?php
   2  
   3  final class DoorkeeperBridgeJIRATestCase extends PhabricatorTestCase {
   4  
   5    public function testJIRABridgeRestAPIURIConversion() {
   6      $map = array(
   7        array(
   8          // Installed at domain root.
   9          'http://jira.example.com/rest/api/2/issue/1',
  10          'TP-1',
  11          'http://jira.example.com/browse/TP-1',
  12        ),
  13        array(
  14          // Installed on path.
  15          'http://jira.example.com/jira/rest/api/2/issue/1',
  16          'TP-1',
  17          'http://jira.example.com/jira/browse/TP-1',
  18        ),
  19        array(
  20          // A URI we don't understand.
  21          'http://jira.example.com/wake/cli/3/task/1',
  22          'TP-1',
  23          null,
  24        ),
  25      );
  26  
  27      foreach ($map as $inputs) {
  28        list($rest_uri, $object_id, $expect) = $inputs;
  29        $this->assertEqual(
  30          $expect,
  31          DoorkeeperBridgeJIRA::getJIRAIssueBrowseURIFromJIRARestURI(
  32            $rest_uri,
  33            $object_id));
  34      }
  35    }
  36  
  37  }


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