summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/Babel/tests/phpunit/unit/BabelStaticTest.php')
-rw-r--r--MLEB/Babel/tests/phpunit/unit/BabelStaticTest.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/MLEB/Babel/tests/phpunit/unit/BabelStaticTest.php b/MLEB/Babel/tests/phpunit/unit/BabelStaticTest.php
new file mode 100644
index 00000000..722fa31b
--- /dev/null
+++ b/MLEB/Babel/tests/phpunit/unit/BabelStaticTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Babel\Tests\Unit;
+
+use Babel;
+use BabelStatic;
+use Parser;
+
+/**
+ * @covers BabelStatic
+ *
+ * @group Babel
+ *
+ * @license GPL-2.0-or-later
+ * @author Thiemo Kreuz
+ */
+class BabelStaticTest extends \MediaWikiUnitTestCase {
+
+ public function testOnParserFirstCallInit() {
+ $parser = $this->getMockBuilder( Parser::class )
+ ->disableOriginalConstructor()
+ ->getMock();
+ $parser->expects( $this->once() )
+ ->method( 'setFunctionHook' )
+ ->with( 'babel', [ Babel::class, 'Render' ] )
+ ->will( $this->returnValue( true ) );
+
+ BabelStatic::onParserFirstCallInit( $parser );
+ }
+
+}