Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7464805
MMLmrootTest.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
MMLmrootTest.php
View Options
<?php
namespace
MediaWiki\Extension\Math\Tests\WikiTexVC\MMLNodes
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLmappings\TexConstants\Variants
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmi
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmn
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmroot
;
use
MediaWikiUnitTestCase
;
/**
* @covers \MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmroot
*
* @group Math
*
* @license GPL-2.0-or-later
*/
class
MMLmrootTest
extends
MediaWikiUnitTestCase
{
public
function
testConstructor
()
{
$mroot
=
new
MMLmroot
(
''
,
[
'mathvariant'
=>
Variants
::
BOLD
]
);
$this
->
assertEquals
(
'mroot'
,
$mroot
->
getName
()
);
$this
->
assertEquals
(
[
'mathvariant'
=>
Variants
::
BOLD
],
$mroot
->
getAttributes
()
);
}
public
function
testTreeConstructor
()
{
$mi
=
new
MMLmi
(
''
,
[],
'x'
);
$mn
=
new
MMLmn
(
''
,
[],
'5'
);
$mroot
=
MMLmroot
::
newSubtree
(
$mi
,
$mn
,
''
,
[
'mathvariant'
=>
Variants
::
BOLD
]
);
$this
->
assertEquals
(
'mroot'
,
$mroot
->
getName
()
);
$this
->
assertEquals
(
[
'mathvariant'
=>
Variants
::
BOLD
],
$mroot
->
getAttributes
()
);
$this
->
assertEquals
(
$mroot
->
getChildren
(),
[
$mi
,
$mn
]
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 23, 04:46 (3 d, 9 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
bb/5e/f4b9e3ea7d2809b155826beb1082
Default Alt Text
MMLmrootTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment