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 { | ||||
protected function getLinter() { | protected function getLinter() { | ||||
return parent::getLinter() | return parent::getLinter() | ||||
->addPartialWordRule('supermn', 'superman') | ->addPartialWordRule('supermn', 'superman') | ||||
->addExactWordRule('batmn', 'batman'); | ->addExactWordRule('batmn', 'batman'); | ||||
} | } | ||||
public function testLinter() { | public function testLinter() { | ||||
$this->executeTestsInDirectory(dirname(__FILE__).'/spelling/'); | $this->executeTestsInDirectory(__DIR__.'/spelling/'); | ||||
} | } | ||||
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 |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0