mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-08 16:02:39 +01:00
[Wilds] Make "Base Commit" parser test cases pass
Summary: Ref T13098. Chip away at test cases: update the tests for `base` rule parsing for the new WorkingCopy objects. Test Plan: Ran `arc unit`, saw fewer test failures. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13098 Differential Revision: https://secure.phabricator.com/D19712
This commit is contained in:
parent
59ef02d263
commit
964707ffdf
5 changed files with 18 additions and 6 deletions
|
@ -150,13 +150,11 @@ final class ArcanistBaseCommitParserTestCase extends PhutilTestCase {
|
|||
// isolation for repository-oriented test cases.
|
||||
|
||||
$root = dirname(phutil_get_library_root('arcanist'));
|
||||
$working_copy = ArcanistWorkingCopyIdentity::newFromPath($root);
|
||||
$configuration_manager = new ArcanistConfigurationManager();
|
||||
$configuration_manager->setWorkingCopyIdentity($working_copy);
|
||||
$repo = ArcanistRepositoryAPI::newAPIFromConfigurationManager(
|
||||
$configuration_manager);
|
||||
$working_copy = ArcanistWorkingCopy::newFromWorkingDirectory($root);
|
||||
|
||||
return new ArcanistBaseCommitParser($repo);
|
||||
$api = $working_copy->newRepositoryAPI();
|
||||
|
||||
return new ArcanistBaseCommitParser($api);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,5 +18,9 @@ final class ArcanistGitWorkingCopy
|
|||
return new self();
|
||||
}
|
||||
|
||||
public function newRepositoryAPI() {
|
||||
return new ArcanistGitAPI($this->getPath());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -18,5 +18,9 @@ final class ArcanistMercurialWorkingCopy
|
|||
return new self();
|
||||
}
|
||||
|
||||
public function newRepositoryAPI() {
|
||||
return new ArcanistMercurialAPI($this->getPath());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -70,5 +70,9 @@ final class ArcanistSubversionWorkingCopy
|
|||
return head($candidates);
|
||||
}
|
||||
|
||||
public function newRepositoryAPI() {
|
||||
return new ArcanistSubversionAPI($this->getPath());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -110,4 +110,6 @@ abstract class ArcanistWorkingCopy
|
|||
return last($candidates);
|
||||
}
|
||||
|
||||
abstract public function newRepositoryAPI();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue