4 * @group GlobalFunctions
5 * @covers ::wfGetCaller
7 class WfGetCallerTest
extends MediaWikiTestCase
{
8 public function testZero() {
9 $this->assertEquals( 'WfGetCallerTest->testZero', wfGetCaller( 1 ) );
12 function callerOne() {
16 public function testOne() {
17 $this->assertEquals( 'WfGetCallerTest->testOne', self
::callerOne() );
20 static function intermediateFunction( $level = 2, $n = 0 ) {
22 return self
::intermediateFunction( $level, $n - 1 );
25 return wfGetCaller( $level );
28 public function testTwo() {
29 $this->assertEquals( 'WfGetCallerTest->testTwo', self
::intermediateFunction() );
32 public function testN() {
33 $this->assertEquals( 'WfGetCallerTest->testN', self
::intermediateFunction( 2, 0 ) );
35 'WfGetCallerTest::intermediateFunction',
36 self
::intermediateFunction( 1, 0 )
39 for ( $i = 0; $i < 10; $i++
) {
41 'WfGetCallerTest::intermediateFunction',
42 self
::intermediateFunction( $i +
1, $i )