Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3282163
ArcanistSpellingLinterTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
771 B
Referenced Files
None
Subscribers
None
ArcanistSpellingLinterTestCase.php
View Options
<?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
Details
Attached
Mime Type
text/x-php
Expires
Mon, Mar 24, 05:43 (4 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1221621
Default Alt Text
ArcanistSpellingLinterTestCase.php (771 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment