Differential D19857 Diff 47420 src/applications/repository/storage/__tests__/PhabricatorRepositoryTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/__tests__/PhabricatorRepositoryTestCase.php
Show All 31 Lines | public function testBranchFilter() { | ||||
$repo = new PhabricatorRepository(); | $repo = new PhabricatorRepository(); | ||||
$repo->setVersionControlSystem($git); | $repo->setVersionControlSystem($git); | ||||
$this->assertTrue( | $this->assertTrue( | ||||
$repo->shouldTrackBranch('imaginary'), | $repo->shouldTrackBranch('imaginary'), | ||||
pht('Track all branches by default.')); | pht('Track all branches by default.')); | ||||
$repo->setDetail( | $repo->setTrackOnlyRules(array('master')); | ||||
'branch-filter', | |||||
array( | |||||
'master' => true, | |||||
)); | |||||
$this->assertTrue( | $this->assertTrue( | ||||
$repo->shouldTrackBranch('master'), | $repo->shouldTrackBranch('master'), | ||||
pht('Track listed branches.')); | pht('Track listed branches.')); | ||||
$this->assertFalse( | $this->assertFalse( | ||||
$repo->shouldTrackBranch('imaginary'), | $repo->shouldTrackBranch('imaginary'), | ||||
pht('Do not track unlisted branches.')); | pht('Do not track unlisted branches.')); | ||||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines |