Index: trunk/phase3/tests/phpunit/includes/MWFunctionTest.php |
— | — | @@ -50,6 +50,22 @@ |
51 | 51 | |
52 | 52 | } |
53 | 53 | |
| 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 | + |
54 | 70 | public static function someMethod() { |
55 | 71 | return func_get_args(); |
56 | 72 | } |