Page MenuHomeSealhub

ArcanistSpellingLinterTestCase.php
No OneTemporary

Authored By
Unknown
Size
777 B
Referenced Files
None
Subscribers
None

ArcanistSpellingLinterTestCase.php

<?php
final class ArcanistSpellingLinterTestCase
extends ArcanistArcanistLinterTestCase {
public function testSpellingLint() {
$linter = new ArcanistSpellingLinter();
$linter->addPartialWordRule('supermn', 'superman');
$linter->addWholeWordRule('batmn', 'batman');
$this->executeTestsInDirectory(
dirname(__FILE__).'/spelling/',
$linter);
}
public function testFixLetterCase() {
$tests = array(
'tst' => 'test',
'Tst' => 'Test',
'TST' => 'TEST',
'tSt' => null,
);
foreach ($tests as $case => $expect) {
foreach (array('test', 'TEST') as $string) {
$result = ArcanistSpellingLinter::fixLetterCase($string, $case);
$this->assertEqual($expect, $result, $case);
}
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Nov 27, 16:27 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1224648
Default Alt Text
ArcanistSpellingLinterTestCase.php (777 B)

Event Timeline