3 class WfGetCallerTest
extends MediaWikiTestCase
{
6 $this->assertEquals( __METHOD__
, wfGetCaller( 1 ) );
14 $this->assertEquals( 'WfGetCallerTest::testOne', self
::callerOne() );
17 function intermediateFunction( $level = 2, $n = 0 ) {
19 return self
::intermediateFunction( $level, $n - 1 );
22 return wfGetCaller( $level );
26 $this->assertEquals( 'WfGetCallerTest::testTwo', self
::intermediateFunction() );
30 $this->assertEquals( 'WfGetCallerTest::testN', self
::intermediateFunction( 2, 0 ) );
31 $this->assertEquals( 'WfGetCallerTest::intermediateFunction', self
::intermediateFunction( 1, 0 ) );
33 for ( $i = 0; $i < 10; $i++
) {
34 $this->assertEquals( 'WfGetCallerTest::intermediateFunction', self
::intermediateFunction( $i +
1, $i ) );