summaryrefslogtreecommitdiff
blob: 2603b72b9cca6139763a12beb0a82c2f3acaef84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 );
	}

}