Differential D21532 Diff 51259 src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php
Show First 20 Lines • Show All 390 Lines • ▼ Show 20 Lines | $this->expectChanges( | ||||
1, | 1, | ||||
1390249286, | 1390249286, | ||||
), | ), | ||||
), | ), | ||||
)); | )); | ||||
} | } | ||||
public function testSubversionParser() { | public function testSubversionParser() { | ||||
$this->requireBinaryForTest('svn'); | |||||
$repository = $this->buildDiscoveredRepository('CHC'); | $repository = $this->buildDiscoveredRepository('CHC'); | ||||
$viewer = PhabricatorUser::getOmnipotentUser(); | $viewer = PhabricatorUser::getOmnipotentUser(); | ||||
$commits = id(new DiffusionCommitQuery()) | $commits = id(new DiffusionCommitQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withRepositoryIDs(array($repository->getID())) | ->withRepositoryIDs(array($repository->getID())) | ||||
->execute(); | ->execute(); | ||||
▲ Show 20 Lines • Show All 543 Lines • ▼ Show 20 Lines | $this->expectChanges( | ||||
1, | 1, | ||||
1, | 1, | ||||
), | ), | ||||
), | ), | ||||
)); | )); | ||||
} | } | ||||
public function testSubversionPartialParser() { | public function testSubversionPartialParser() { | ||||
$this->requireBinaryForTest('svn'); | |||||
$repository = $this->buildBareRepository('CHD'); | $repository = $this->buildBareRepository('CHD'); | ||||
$repository->setDetail('svn-subpath', 'trunk/'); | $repository->setDetail('svn-subpath', 'trunk/'); | ||||
id(new PhabricatorRepositoryPullEngine()) | id(new PhabricatorRepositoryPullEngine()) | ||||
->setRepository($repository) | ->setRepository($repository) | ||||
->pullRepository(); | ->pullRepository(); | ||||
id(new PhabricatorRepositoryDiscoveryEngine()) | id(new PhabricatorRepositoryDiscoveryEngine()) | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | $this->expectChanges( | ||||
1, | 1, | ||||
3, | 3, | ||||
), | ), | ||||
), | ), | ||||
)); | )); | ||||
} | } | ||||
public function testSubversionValidRootParser() { | public function testSubversionValidRootParser() { | ||||
$this->requireBinaryForTest('svn'); | |||||
// First, automatically configure the root correctly. | // First, automatically configure the root correctly. | ||||
$repository = $this->buildBareRepository('CHD'); | $repository = $this->buildBareRepository('CHD'); | ||||
id(new PhabricatorRepositoryPullEngine()) | id(new PhabricatorRepositoryPullEngine()) | ||||
->setRepository($repository) | ->setRepository($repository) | ||||
->pullRepository(); | ->pullRepository(); | ||||
$caught = null; | $caught = null; | ||||
try { | try { | ||||
Show All 29 Lines | public function testSubversionValidRootParser() { | ||||
} | } | ||||
$this->assertTrue( | $this->assertTrue( | ||||
($caught instanceof Exception), | ($caught instanceof Exception), | ||||
pht('Artificial SVN root should fail.')); | pht('Artificial SVN root should fail.')); | ||||
} | } | ||||
public function testSubversionForeignStubsParser() { | public function testSubversionForeignStubsParser() { | ||||
$this->requireBinaryForTest('svn'); | |||||
$repository = $this->buildBareRepository('CHE'); | $repository = $this->buildBareRepository('CHE'); | ||||
$repository->setDetail('svn-subpath', 'branch/'); | $repository->setDetail('svn-subpath', 'branch/'); | ||||
id(new PhabricatorRepositoryPullEngine()) | id(new PhabricatorRepositoryPullEngine()) | ||||
->setRepository($repository) | ->setRepository($repository) | ||||
->pullRepository(); | ->pullRepository(); | ||||
id(new PhabricatorRepositoryDiscoveryEngine()) | id(new PhabricatorRepositoryDiscoveryEngine()) | ||||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |