1
0
Fork 0
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:
epriestley 2018-09-27 10:32:23 -07:00
parent 59ef02d263
commit 964707ffdf
5 changed files with 18 additions and 6 deletions

View file

@ -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);
}
}

View file

@ -18,5 +18,9 @@ final class ArcanistGitWorkingCopy
return new self();
}
public function newRepositoryAPI() {
return new ArcanistGitAPI($this->getPath());
}
}

View file

@ -18,5 +18,9 @@ final class ArcanistMercurialWorkingCopy
return new self();
}
public function newRepositoryAPI() {
return new ArcanistMercurialAPI($this->getPath());
}
}

View file

@ -70,5 +70,9 @@ final class ArcanistSubversionWorkingCopy
return head($candidates);
}
public function newRepositoryAPI() {
return new ArcanistSubversionAPI($this->getPath());
}
}

View file

@ -110,4 +110,6 @@ abstract class ArcanistWorkingCopy
return last($candidates);
}
abstract public function newRepositoryAPI();
}