xref: /PHP-5.6/ext/reflection/tests/bug37964.phpt (revision 626881d9)
1--TEST--
2Reflection Bug #37964 (Reflection shows private methods of parent class)
3--FILE--
4<?php
5
6abstract class foobar {
7	private function test2() {
8	}
9}
10class foo extends foobar {
11	private $foo = 1;
12	private function test() {
13	}
14	protected function test3() {
15	}
16}
17class bar extends foo {
18	private function foobar() {
19	}
20}
21
22Reflection::export(new ReflectionClass(new bar));
23
24?>
25--EXPECTF--
26Class [ <user> class bar extends foo ] {
27  @@ %s %s
28
29  - Constants [0] {
30  }
31
32  - Static properties [0] {
33  }
34
35  - Static methods [0] {
36  }
37
38  - Properties [0] {
39  }
40
41  - Methods [2] {
42    Method [ <user> private method foobar ] {
43      @@ %s %d - %d
44    }
45
46    Method [ <user, inherits foo> protected method test3 ] {
47      @@ %s %d - %d
48    }
49  }
50}
51