summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php')
-rw-r--r--tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php b/tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php
index 58cf6b95..62296245 100644
--- a/tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php
+++ b/tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php
@@ -1,8 +1,11 @@
<?php
+/**
+ * @covers ::wfGetCaller
+ */
class WfGetCallerTest extends MediaWikiTestCase {
- function testZero() {
+ public function testZero() {
$this->assertEquals( __METHOD__, wfGetCaller( 1 ) );
}
@@ -10,7 +13,7 @@ class WfGetCallerTest extends MediaWikiTestCase {
return wfGetCaller();
}
- function testOne() {
+ public function testOne() {
$this->assertEquals( 'WfGetCallerTest::testOne', self::callerOne() );
}
@@ -18,18 +21,20 @@ class WfGetCallerTest extends MediaWikiTestCase {
if ( $n > 0 ) {
return self::intermediateFunction( $level, $n - 1 );
}
+
return wfGetCaller( $level );
}
- function testTwo() {
+ public function testTwo() {
$this->assertEquals( 'WfGetCallerTest::testTwo', self::intermediateFunction() );
}
- function testN() {
+ public function testN() {
$this->assertEquals( 'WfGetCallerTest::testN', self::intermediateFunction( 2, 0 ) );
$this->assertEquals( 'WfGetCallerTest::intermediateFunction', self::intermediateFunction( 1, 0 ) );
- for ( $i = 0; $i < 10; $i++ )
+ for ( $i = 0; $i < 10; $i++ ) {
$this->assertEquals( 'WfGetCallerTest::intermediateFunction', self::intermediateFunction( $i + 1, $i ) );
+ }
}
}