Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7432972
MMLleafTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
827 B
Referenced Files
None
Subscribers
None
MMLleafTest.php
View Options
<?php
namespace
MediaWiki\Extension\Math\Tests\WikiTexVC\MMLnodes
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLleaf
;
use
MediaWikiUnitTestCase
;
/**
* @covers \MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLleaf
*
* @group Math
*
* @license GPL-2.0-or-later
*/
class
MMLleafTest
extends
MediaWikiUnitTestCase
{
private
function
createLeafMock
(
string
$name
=
'mi'
,
string
$texclass
=
''
,
array
$attributes
=
[],
string
$text
=
''
):
MMLleaf
{
return
$this
->
getMockForAbstractClass
(
MMLleaf
::
class
,
[
$name
,
$texclass
,
$attributes
,
$text
]
);
}
public
function
testConstructorInitialization
()
{
$leaf
=
$this
->
createLeafMock
(
'test'
,
'tex-class'
,
[
'attr'
=>
'value'
],
'text'
);
$this
->
assertEquals
(
'test'
,
$leaf
->
getName
()
);
$this
->
assertEquals
(
'text'
,
$leaf
->
getText
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 11:40 (3 h, 29 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ac/7d/c73a23d201a2fc3937785f0ce338
Default Alt Text
MMLleafTest.php (827 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment