From: X! Date: Mon, 3 Jan 2011 21:14:22 +0000 (+0000) Subject: Followup r79523: Test that calling self:: and parent:: throws exception X-Git-Tag: 1.31.0-rc.0~32853 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=c2f3948ecfcd0e8eec19efd304da46e7eee3305f;p=lhc%2Fweb%2Fwiklou.git Followup r79523: Test that calling self:: and parent:: throws exception --- diff --git a/tests/phpunit/includes/MWFunctionTest.php b/tests/phpunit/includes/MWFunctionTest.php index 9b32b406a7..ed5e760296 100644 --- a/tests/phpunit/includes/MWFunctionTest.php +++ b/tests/phpunit/includes/MWFunctionTest.php @@ -50,6 +50,22 @@ class MWFunctionTest extends MediaWikiTestCase { } + /** + * @expectedException MWException + */ + function testCallingParentFails() { + + MWFunction::call( 'parent::foo' ); + } + + /** + * @expectedException MWException + */ + function testCallingSelfFails() { + + MWFunction::call( 'self::foo' ); + } + public static function someMethod() { return func_get_args(); }