Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F35134352
PhabricatorMarkupEngineTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
PhabricatorMarkupEngineTestCase.php
View Options
<?php
final
class
PhabricatorMarkupEngineTestCase
extends
PhabricatorTestCase
{
public
function
testRemarkupSentenceSummmaries
()
{
$this
->
assertSentenceSummary
(
'The quick brown fox. Jumped over the lazy dog.'
,
'The quick brown fox.'
);
$this
->
assertSentenceSummary
(
'Go to www.help.com for details. Good day.'
,
'Go to www.help.com for details.'
);
$this
->
assertSentenceSummary
(
'Coxy lummox gives squid who asks for job pen.'
,
'Coxy lummox gives squid who asks for job pen.'
);
$this
->
assertSentenceSummary
(
'DEPRECATED'
,
'DEPRECATED'
);
$this
->
assertSentenceSummary
(
'Never use this! It is deadly poison.'
,
'Never use this!'
);
$this
->
assertSentenceSummary
(
"a short poem
\n
meow meow meow
\n
meow meow meow
\n\n
- cat"
,
'a short poem'
);
$this
->
assertSentenceSummary
(
'WOW!! GREAT PROJECT!'
,
'WOW!!'
);
}
private
function
assertSentenceSummary
(
$corpus
,
$summary
)
{
$this
->
assertEqual
(
$summary
,
PhabricatorMarkupEngine
::
summarizeSentence
(
$corpus
),
pht
(
'Summary of: %s'
,
$corpus
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Feb 1, 7:23 PM (1 d, 3 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
42/f1/186b9abdfc4428d76b6d2100f42a
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment