Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7452971
SectionTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
776 B
Referenced Files
None
Subscribers
None
SectionTest.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
MediaWiki\Extension\Translate\PageTranslation
;
use
MediaWikiUnitTestCase
;
/**
* @author Niklas Laxström
* @license GPL-2.0-or-later
* @covers \MediaWiki\Extension\Translate\PageTranslation\Section
*/
class
SectionTest
extends
MediaWikiUnitTestCase
{
public
function
test
()
{
$section
=
new
Section
(
'<translate>'
,
'2045903458'
,
'</translate>'
);
$this
->
assertSame
(
'2045903458'
,
$section
->
contents
()
);
$this
->
assertSame
(
'<translate>2045903458</translate>'
,
$section
->
wrappedContents
()
);
$section
=
new
Section
(
'<translate>'
,
"
\n\n
<0>
\n\n
"
,
'</translate>'
);
$this
->
assertSame
(
"
\n
<0>
\n
"
,
$section
->
contents
()
);
$this
->
assertSame
(
"<translate>
\n\n
<0>
\n\n
</translate>"
,
$section
->
wrappedContents
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 22:32 (2 d, 7 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
73/0e/68cffe21059bf13de79e7ab64467
Default Alt Text
SectionTest.php (776 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment