Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892218
PhabricatorMarkupEngineTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
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\nmeow meow meow\nmeow 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, Jan 19, 16:26 (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126467
Default Alt Text
PhabricatorMarkupEngineTestCase.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment