Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php
Show All 24 Lines | public function testSvnStateParsing() { | ||||
if (Filesystem::binaryExists('svn')) { | if (Filesystem::binaryExists('svn')) { | ||||
$this->parseState('svn_basic.svn.tgz'); | $this->parseState('svn_basic.svn.tgz'); | ||||
} else { | } else { | ||||
$this->assertSkipped(pht('Subversion is not installed')); | $this->assertSkipped(pht('Subversion is not installed')); | ||||
} | } | ||||
} | } | ||||
private function parseState($test) { | private function parseState($test) { | ||||
$dir = dirname(__FILE__).'/state/'; | $dir = __DIR__.'/state/'; | ||||
$fixture = PhutilDirectoryFixture::newFromArchive($dir.'/'.$test); | $fixture = PhutilDirectoryFixture::newFromArchive($dir.'/'.$test); | ||||
$fixture_path = $fixture->getPath(); | $fixture_path = $fixture->getPath(); | ||||
$working_copy = ArcanistWorkingCopyIdentity::newFromPath($fixture_path); | $working_copy = ArcanistWorkingCopyIdentity::newFromPath($fixture_path); | ||||
$configuration_manager = new ArcanistConfigurationManager(); | $configuration_manager = new ArcanistConfigurationManager(); | ||||
$configuration_manager->setWorkingCopyIdentity($working_copy); | $configuration_manager->setWorkingCopyIdentity($working_copy); | ||||
$api = ArcanistRepositoryAPI::newAPIFromConfigurationManager( | $api = ArcanistRepositoryAPI::newAPIFromConfigurationManager( | ||||
$configuration_manager); | $configuration_manager); | ||||
▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0