Page MenuHomeSealhub

ArcanistSpellingLinterTestCase.php
No OneTemporary

ArcanistSpellingLinterTestCase.php

<?php
/**
* Test cases for @{class:ArcanistSpellingLinter}.
*
* @group testcase
*/
final class ArcanistSpellingLinterTestCase
extends ArcanistArcanistLinterTestCase {
public function testSpellingLint() {
$linter = new ArcanistSpellingLinter();
$linter->removeLintRule('acc'.'out');
$linter->addPartialWordRule('supermn', 'superman');
$linter->addWholeWordRule('batmn', 'batman');
$working_copy = ArcanistWorkingCopyIdentity::newFromPath(__FILE__);
return $this->executeTestsInDirectory(
dirname(__FILE__).'/spelling/',
$linter,
$working_copy);
}
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
Wed, Aug 13, 20:16 (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
877025
Default Alt Text
ArcanistSpellingLinterTestCase.php (999 B)

Event Timeline