Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4056779
BaseMethodsTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
BaseMethodsTest.php
View Options
<?php
namespace
MediaWiki\Extension\Math\Tests\WikiTexVC\MMLmappings
;
use
LogicException
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLmappings\BaseMethods
;
use
MediaWiki\Extension\Math\WikiTexVC\Nodes\TexNode
;
use
MediaWikiIntegrationTestCase
;
/**
* @covers \MediaWiki\Extension\Math\WikiTexVC\MMLmappings\BaseMethods
*/
class
BaseMethodsTest
extends
MediaWikiIntegrationTestCase
{
public
function
testCheckAndParseOperatorWithU
()
{
$bm
=
new
BaseMethods
();
$this
->
assertNull
(
$bm
->
checkAndParseOperator
(
'
\u
3009'
,
null
,
[],
[],
[]
)
);
$this
->
assertNull
(
$bm
->
checkAndParseOperator
(
'〉'
,
null
,
[],
[],
[]
)
);
}
public
function
testCheckAndParseOperatorNormal
()
{
$bm
=
new
BaseMethods
();
$op
=
$bm
->
checkAndParseOperator
(
'!'
,
null
,
[],
[],
[]
);
$this
->
assertStringContainsString
(
'!</mo>'
,
$op
);
}
public
function
testCheckAndParseOperatorSpecial
()
{
$bm
=
new
BaseMethods
();
$op
=
$bm
->
checkAndParseOperator
(
'>'
,
null
,
[],
[],
[]
);
$this
->
assertStringContainsString
(
'></mo>'
,
$op
);
}
public
function
testInvalidCall
()
{
$this
->
expectException
(
LogicException
::
class
);
$this
->
expectExceptionMessage
(
'Callback to MediaWiki
\E
xtension
\M
ath
\W
ikiTexVC
\N
odes
\F
un1::lap'
.
' should be treated in the respective class.'
);
BaseMethods
::
checkAndParse
(
'
\\
llap'
,
null
,
[],
new
TexNode
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 16 2026, 03:38 (13 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b4/09/7cd0484089f04374b063bf5f8bc8
Default Alt Text
BaseMethodsTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment