Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F8891189
ArcanistSpellingLinterTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
754 B
Subscribers
None
ArcanistSpellingLinterTestCase.php
View Options
<?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
Details
Attached
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)
Attached To
rARC Arcanist
Event Timeline
Log In to Comment