Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97612461
PhabricatorMarkupEngineTestCase.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, Jan 5, 17:27
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jan 7, 17:27 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23365325
Attached To
rPH Phabricator
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
));
}
}
Event Timeline
Log In to Comment