Page MenuHomePhabricator

ArcanistSpellingLinterTestCase.php
No OneTemporary

ArcanistSpellingLinterTestCase.php

<?php
final class ArcanistSpellingLinterTestCase extends ArcanistLinterTestCase {
protected function getLinter() {
return parent::getLinter()
->addPartialWordRule('supermn', 'superman')
->addExactWordRule('batmn', 'batman');
}
public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/spelling/');
}
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
Thu, Jun 10, 2:48 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
3388024
Default Alt Text
ArcanistSpellingLinterTestCase.php (754 B)

Event Timeline