Changeset View
Changeset View
Standalone View
Standalone View
src/parser/__tests__/ArcanistBaseCommitParserTestCase.php
| Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | final class ArcanistBaseCommitParserTestCase extends PhutilTestCase { | ||||
| } | } | ||||
| private function buildParser() { | private function buildParser() { | ||||
| // TODO: This is a little hacky because we're using the Arcanist repository | // TODO: This is a little hacky because we're using the Arcanist repository | ||||
| // itself to execute tests with, but it should be OK until we get proper | // itself to execute tests with, but it should be OK until we get proper | ||||
| // isolation for repository-oriented test cases. | // isolation for repository-oriented test cases. | ||||
| $root = dirname(phutil_get_library_root('arcanist')); | $root = dirname(phutil_get_library_root('arcanist')); | ||||
| $working_copy = ArcanistWorkingCopyIdentity::newFromPath($root); | $working_copy = ArcanistWorkingCopy::newFromWorkingDirectory($root); | ||||
| $configuration_manager = new ArcanistConfigurationManager(); | |||||
| $configuration_manager->setWorkingCopyIdentity($working_copy); | |||||
| $repo = ArcanistRepositoryAPI::newAPIFromConfigurationManager( | |||||
| $configuration_manager); | |||||
| return new ArcanistBaseCommitParser($repo); | $api = $working_copy->newRepositoryAPI(); | ||||
| return new ArcanistBaseCommitParser($api); | |||||
| } | } | ||||
| } | } | ||||