Page MenuHomePhorge

ArcanistSpellingLinterTestCase.php
No OneTemporary

ArcanistSpellingLinterTestCase.php

<?php
final class ArcanistSpellingLinterTestCase
extends ArcanistArcanistLinterTestCase {
public function testLinter() {
$linter = new ArcanistSpellingLinter();
$linter->addPartialWordRule('supermn', 'superman');
$linter->addExactWordRule('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
Mon, Mar 24, 05:44 (4 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1221621
Default Alt Text
ArcanistSpellingLinterTestCase.php (771 B)

Event Timeline