Differential D13271 Diff 32123 src/applications/doorkeeper/bridge/__tests__/DoorkeeperJIRABridgeTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/doorkeeper/bridge/__tests__/DoorkeeperJIRABridgeTestCase.php
- This file was moved from src/applications/doorkeeper/bridge/__tests__/DoorkeeperBridgeJIRATestCase.php.
<?php | <?php | ||||
final class DoorkeeperBridgeJIRATestCase extends PhabricatorTestCase { | final class DoorkeeperJIRABridgeTestCase extends PhabricatorTestCase { | ||||
public function testJIRABridgeRestAPIURIConversion() { | public function testJIRABridgeRestAPIURIConversion() { | ||||
$map = array( | $map = array( | ||||
array( | array( | ||||
// Installed at domain root. | // Installed at domain root. | ||||
'http://jira.example.com/rest/api/2/issue/1', | 'http://jira.example.com/rest/api/2/issue/1', | ||||
'TP-1', | 'TP-1', | ||||
'http://jira.example.com/browse/TP-1', | 'http://jira.example.com/browse/TP-1', | ||||
Show All 11 Lines | $map = array( | ||||
null, | null, | ||||
), | ), | ||||
); | ); | ||||
foreach ($map as $inputs) { | foreach ($map as $inputs) { | ||||
list($rest_uri, $object_id, $expect) = $inputs; | list($rest_uri, $object_id, $expect) = $inputs; | ||||
$this->assertEqual( | $this->assertEqual( | ||||
$expect, | $expect, | ||||
DoorkeeperBridgeJIRA::getJIRAIssueBrowseURIFromJIRARestURI( | DoorkeeperJIRABridge::getJIRAIssueBrowseURIFromJIRARestURI( | ||||
$rest_uri, | $rest_uri, | ||||
$object_id)); | $object_id)); | ||||
} | } | ||||
} | } | ||||
} | } |