Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / diffusion / data / __tests__ / DiffusionGitBranchTestCase.php
blob90b36347e1f9a9affd6c4d3dde2ce8acd1982f8d
1 <?php
3 final class DiffusionGitBranchTestCase
4 extends PhabricatorTestCase {
6 public function testRemoteBranchParser() {
8 $output = <<<EOTXT
9 origin/HEAD -> origin/master
10 origin/accent-folding bfaea2e72197506e028c604cd1a294b6e37aa17d Add...
11 origin/eventordering 185a90a3c1b0556015e5f318fb86ccf8f7a6f3e3 RFC: Order...
12 origin/master 713f1fc54f9cfc830acbf6bbdb46a2883f772896 Automat...
13 alternate/stuff 4444444444444444444444444444444444444444 Hmm...
14 origin/HEAD 713f1fc54f9cfc830acbf6bbdb46a2883f772896
15 origin/refactoring 6e947ab0498b82075ca6195ac168385a11326c4b
16 alternate/release-1.0.0 9ddd5d67962dd89fa167f9989954468b6c517b87
18 EOTXT;
20 $this->assertEqual(
21 array(
22 'origin/accent-folding' => 'bfaea2e72197506e028c604cd1a294b6e37aa17d',
23 'origin/eventordering' => '185a90a3c1b0556015e5f318fb86ccf8f7a6f3e3',
24 'origin/master' => '713f1fc54f9cfc830acbf6bbdb46a2883f772896',
25 'alternate/stuff' => '4444444444444444444444444444444444444444',
26 'origin/refactoring' => '6e947ab0498b82075ca6195ac168385a11326c4b',
27 'alternate/release-1.0.0' => '9ddd5d67962dd89fa167f9989954468b6c517b87',
29 DiffusionGitBranch::parseRemoteBranchOutput($output));
31 $this->assertEqual(
32 array(
33 'accent-folding' => 'bfaea2e72197506e028c604cd1a294b6e37aa17d',
34 'eventordering' => '185a90a3c1b0556015e5f318fb86ccf8f7a6f3e3',
35 'master' => '713f1fc54f9cfc830acbf6bbdb46a2883f772896',
36 'refactoring' => '6e947ab0498b82075ca6195ac168385a11326c4b',
38 DiffusionGitBranch::parseRemoteBranchOutput($output, 'origin'));