r79529 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79528‎ | r79529 | r79530 >
Date:21:14, 3 January 2011
Author:soxred93
Status:ok
Tags:
Comment:
Followup r79523: Test that calling self:: and parent:: throws exception
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/MWFunctionTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/MWFunctionTest.php
@@ -50,6 +50,22 @@
5151
5252 }
5353
 54+ /**
 55+ * @expectedException MWException
 56+ */
 57+ function testCallingParentFails() {
 58+
 59+ MWFunction::call( 'parent::foo' );
 60+ }
 61+
 62+ /**
 63+ * @expectedException MWException
 64+ */
 65+ function testCallingSelfFails() {
 66+
 67+ MWFunction::call( 'self::foo' );
 68+ }
 69+
5470 public static function someMethod() {
5571 return func_get_args();
5672 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79523Throw an exception if calling parent or self on MWFunction.soxred9320:19, 3 January 2011

Status & tagging log