Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php
<?php | <?php | ||||
final class ArcanistSpellingLinterTestCase extends ArcanistLinterTestCase { | final class ArcanistSpellingLinterTestCase extends ArcanistLinterTestCase { | ||||
public function testLinter() { | protected function getLinter() { | ||||
$linter = new ArcanistSpellingLinter(); | return parent::getLinter() | ||||
$linter->addPartialWordRule('supermn', 'superman'); | ->addPartialWordRule('supermn', 'superman') | ||||
$linter->addExactWordRule('batmn', 'batman'); | ->addExactWordRule('batmn', 'batman'); | ||||
} | |||||
$this->executeTestsInDirectory( | public function testLinter() { | ||||
dirname(__FILE__).'/spelling/', | $this->executeTestsInDirectory(dirname(__FILE__).'/spelling/'); | ||||
$linter); | |||||
} | } | ||||
public function testFixLetterCase() { | public function testFixLetterCase() { | ||||
$tests = array( | $tests = array( | ||||
'tst' => 'test', | 'tst' => 'test', | ||||
'Tst' => 'Test', | 'Tst' => 'Test', | ||||
'TST' => 'TEST', | 'TST' => 'TEST', | ||||
'tSt' => null, | 'tSt' => null, | ||||
Show All 10 Lines |