Page MenuHomeWickedGov Phorge

MMLleafTest.php
No OneTemporary

Size
827 B
Referenced Files
None
Subscribers
None

MMLleafTest.php

<?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

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)

Event Timeline