3
final class ArcanistBritishTestCase extends ArcanistTestCase {
5
public function testCommandCompletion() {
6
$this->assertCommandCompletion(
9
array('land', 'amend'));
11
$this->assertCommandCompletion(
14
array('branch', 'browse'));
16
$this->assertCommandCompletion(
19
array('list', 'unit'));
21
$this->assertCommandCompletion(
26
$this->assertCommandCompletion(
31
$this->assertCommandCompletion(
34
array('unit', 'lint', 'list'));
36
$this->assertCommandCompletion(
37
array('list', 'lint'),
39
array('unit', 'lint', 'list'));
42
private function assertCommandCompletion($expect, $input, $commands) {
43
$result = ArcanistConfiguration::correctCommandSpelling(
51
$commands = implode(', ', $commands);
56
"Correction of {$input} against: {$commands}");
59
public function testArgumentCompletion() {
60
$this->assertArgumentCompletion(
63
array('nolint', 'nounit'));
65
$this->assertArgumentCompletion(
68
array('reviewers', 'cc'));
70
$this->assertArgumentCompletion(
75
$this->assertArgumentCompletion(
81
private function assertArgumentCompletion($expect, $input, $arguments) {
82
$result = ArcanistConfiguration::correctArgumentSpelling(
89
$arguments = implode(', ', $arguments);
94
"Correction of {$input} against: {$arguments}");