Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F116650911
DifferentialCustomFieldDependsOnParserTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jun 8, 06:53
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jun 10, 06:53 (2 d)
Engine
blob
Format
Raw Data
Handle
26656380
Attached To
rPH Phabricator
DifferentialCustomFieldDependsOnParserTestCase.php
View Options
<?php
final
class
DifferentialCustomFieldDependsOnParserTestCase
extends
PhabricatorTestCase
{
public
function
testParser
()
{
$map
=
array
(
'quack quack quack'
=>
array
(),
'D123'
=>
array
(),
'depends on D123'
=>
array
(
array
(
'match'
=>
'depends on D123'
,
'prefix'
=>
'depends on'
,
'infix'
=>
''
,
'monograms'
=>
array
(
'D123'
),
'suffix'
=>
''
,
'offset'
=>
0
,
),
),
'depends on D123.'
=>
array
(
array
(
'match'
=>
'depends on D123'
,
'prefix'
=>
'depends on'
,
'infix'
=>
''
,
'monograms'
=>
array
(
'D123'
),
'suffix'
=>
''
,
'offset'
=>
0
,
),
),
'depends on D123, d124'
=>
array
(
array
(
'match'
=>
'depends on D123, d124'
,
'prefix'
=>
'depends on'
,
'infix'
=>
''
,
'monograms'
=>
array
(
'D123'
,
'd124'
),
'suffix'
=>
''
,
'offset'
=>
0
,
),
),
'depends on rev D123'
=>
array
(
array
(
'match'
=>
'depends on rev D123'
,
'prefix'
=>
'depends on'
,
'infix'
=>
'rev'
,
'monograms'
=>
array
(
'D123'
),
'suffix'
=>
''
,
'offset'
=>
0
,
),
),
'depends on duck'
=>
array
(
),
'depends on D123abc'
=>
array
(
),
);
foreach
(
$map
as
$input
=>
$expect
)
{
$parser
=
new
DifferentialCustomFieldDependsOnParser
();
$output
=
$parser
->
parseCorpus
(
$input
);
$this
->
assertEqual
(
$expect
,
$output
,
$input
);
}
}
}
Event Timeline
Log In to Comment