Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91774012
DifferentialCommitMessageFieldTestCase.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
Thu, Nov 14, 08:24
Size
798 B
Mime Type
text/x-php
Expires
Sat, Nov 16, 08:24 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22321558
Attached To
rPH Phabricator
DifferentialCommitMessageFieldTestCase.php
View Options
<?php
final
class
DifferentialCommitMessageFieldTestCase
extends
PhabricatorTestCase
{
public
function
testRevisionCommitMessageFieldParsing
()
{
$base_uri
=
'https://www.example.com/'
;
$tests
=
array
(
'D123'
=>
123
,
'd123'
=>
123
,
"
\n
d123
\n
"
=>
123
,
"D123
\n
Some-Custom-Field: The End"
=>
123
,
"{$base_uri}D123"
=>
123
,
"{$base_uri}D123
\n
Some-Custom-Field: The End"
=>
123
,
);
$env
=
PhabricatorEnv
::
beginScopedEnv
();
$env
->
overrideEnvConfig
(
'phabricator.base-uri'
,
$base_uri
);
foreach
(
$tests
as
$input
=>
$expect
)
{
$actual
=
id
(
new
DifferentialRevisionIDCommitMessageField
())
->
parseFieldValue
(
$input
);
$this
->
assertEqual
(
$expect
,
$actual
,
pht
(
'Parse of: %s'
,
$input
));
}
unset
(
$env
);
}
}
Event Timeline
Log In to Comment