Debian Codegraph @

extensions/Math/tests/phpunit/unit/WikiTexVC/MMLmappings/BaseMethodsTest.php

raw symbols SCIP
1 <?php
2 namespace MediaWiki\Extension\Math\Tests\WikiTexVC\MMLmappings;
3
4 use MediaWiki\Extension\Math\WikiTexVC\MMLmappings\BaseMethods;
5 use PHPUnit\Framework\TestCase;
6
7 /**
8 * @covers \MediaWiki\Extension\Math\WikiTexVC\MMLmappings\BaseMethods
9 */
10 class BaseMethodsTest extends TestCase {
11 public function testCheckAndParseOperatorWithU() {
12 $bm = new BaseMethods();
13 $this->assertNull( $bm->checkAndParseOperator( '\u3009', null, [], [], [] ) );
14 $this->assertNull( $bm->checkAndParseOperator( '&#x3009;', null, [], [], [] ) );
15 }
16
17 public function testCheckAndParseOperatorNormal() {
18 $bm = new BaseMethods();
19 $op = $bm->checkAndParseOperator( '!', null, [], [], [] );
20 $this->assertStringContainsString( '!</mo>', $op );
21 }
22
23 public function testCheckAndParseOperatorSpecial() {
24 $bm = new BaseMethods();
25 $op = $bm->checkAndParseOperator( '>', null, [], [], [] );
26 $this->assertStringContainsString( '&gt;</mo>', $op );
27 }
28
29 }