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