Page MenuHomeWickedGov Phorge

BaseMethodsTest.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

BaseMethodsTest.php

<?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( '\u3009', null, [], [], [] ) );
$this->assertNull( $bm->checkAndParseOperator( '&#x3009;', 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( '&gt;</mo>', $op );
}
public function testInvalidCall() {
$this->expectException( LogicException::class );
$this->expectExceptionMessage( 'Callback to MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun1::lap' .
' should be treated in the respective class.' );
BaseMethods::checkAndParse( '\\llap', null, [], new TexNode() );
}
}

File Metadata

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)

Event Timeline