Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7440094
MMLmfracTest.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
MMLmfracTest.php
View Options
<?php
namespace
phpunit\unit\WikiTexVC\MMLNodes
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmfrac
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmi
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmn
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmo
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmrow
;
use
MediaWikiUnitTestCase
;
/**
* @covers \MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmfrac
*
* @group Math
*
* @license GPL-2.0-or-later
*/
class
MMLmfracTest
extends
MediaWikiUnitTestCase
{
public
function
testConstructor
()
{
$frac
=
new
MMLmfrac
(
''
,
[
'mathvariant'
=>
'bold'
]
);
$this
->
assertEquals
(
'mfrac'
,
$frac
->
getName
()
);
$this
->
assertEquals
(
[
'mathvariant'
=>
'bold'
],
$frac
->
getAttributes
()
);
}
public
function
testTreeConstructor
()
{
$mi
=
new
MMLmi
(
''
,
[],
'x'
);
$mo
=
new
MMLmo
(
''
,
[],
'+'
);
$mn
=
new
MMLmn
(
''
,
[],
'5'
);
$mrowNumerator
=
new
MMLmrow
(
''
,
[
'mathvariant'
=>
'bold'
],
$mi
,
$mo
,
$mn
);
$mrowDenominator
=
new
MMLmrow
(
''
,
[
'mathvariant'
=>
'bold'
],
$mn
,
$mo
,
$mi
);
$frac
=
MMLmfrac
::
newSubtree
(
$mrowNumerator
,
$mrowDenominator
,
''
,
[
'mathvariant'
=>
'bold'
]
);
$this
->
assertEquals
(
'mfrac'
,
$frac
->
getName
()
);
$this
->
assertEquals
(
[
'mathvariant'
=>
'bold'
],
$frac
->
getAttributes
()
);
$this
->
assertEquals
(
$frac
->
getChildren
(),
[
$mrowNumerator
,
$mrowDenominator
]
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 15:23 (10 h, 34 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
47/5a/6ccf7cb1f8566e4273b2ba4a8c34
Default Alt Text
MMLmfracTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment