Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22398161
ArcanistSpellingLinterTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
761 B
Referenced Files
None
Subscribers
None
ArcanistSpellingLinterTestCase.php
View Options
<?php
final
class
ArcanistSpellingLinterTestCase
extends
ArcanistLinterTestCase
{
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
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 27, 17:20 (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1212344
Default Alt Text
ArcanistSpellingLinterTestCase.php (761 B)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline