Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F73404687
DifferentialFreeformFieldTestCase.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, Jul 21, 03:18
Size
911 B
Mime Type
text/x-php
Expires
Tue, Jul 23, 03:18 (2 d)
Engine
blob
Format
Raw Data
Handle
19196322
Attached To
rPH Phabricator
DifferentialFreeformFieldTestCase.php
View Options
<?php
final
class
DifferentialFreeformFieldTestCase
extends
PhabricatorTestCase
{
public
function
testRevertedCommitParser
()
{
$map
=
array
(
"Reverts 123"
=>
array
(
'123'
),
"Reverts r123"
=>
array
(
'r123'
),
"Reverts ac382f2"
=>
array
(
'ac382f2'
),
"Reverts r22, r23"
=>
array
(
'r22'
,
'r23'
),
"Reverts D99"
=>
array
(
'D99'
),
"Backs out commit
\n
99
\n
100"
=>
array
(
'99'
,
'100'
),
"undo change f9f9f8f8"
=>
array
(
'f9f9f8f8'
),
"Backedout Changeset rX1234"
=>
array
(
'rX1234'
),
"This doesn't revert anything"
=>
array
(),
'nonrevert of r11'
=>
array
(),
"fixed a bug"
=>
array
(),
);
foreach
(
$map
as
$input
=>
$expect
)
{
$actual
=
array_values
(
DifferentialFreeformFieldSpecification
::
findRevertedCommits
(
$input
));
$this
->
assertEqual
(
$expect
,
$actual
,
"Reverted commits in: {$input}"
);
}
}
}
Event Timeline
Log In to Comment