4 * @covers ::wfGetCaller
6 class WfGetCallerTest
extends MediaWikiTestCase
{
7 public function testZero() {
8 $this->assertEquals( __METHOD__
, wfGetCaller( 1 ) );
11 function callerOne() {
15 public function testOne() {
16 $this->assertEquals( 'WfGetCallerTest::testOne', self
::callerOne() );
19 function intermediateFunction( $level = 2, $n = 0 ) {
21 return self
::intermediateFunction( $level, $n - 1 );
24 return wfGetCaller( $level );
27 public function testTwo() {
28 $this->assertEquals( 'WfGetCallerTest::testTwo', self
::intermediateFunction() );
31 public function testN() {
32 $this->assertEquals( 'WfGetCallerTest::testN', self
::intermediateFunction( 2, 0 ) );
34 'WfGetCallerTest::intermediateFunction',
35 self
::intermediateFunction( 1, 0 )
38 for ( $i = 0; $i < 10; $i++
) {
40 'WfGetCallerTest::intermediateFunction',
41 self
::intermediateFunction( $i +
1, $i )