xref: /PHP-5.5/ext/reflection/tests/bug30148.phpt (revision 610c7fbe)
1--TEST--
2Reflection Bug #30148 (ReflectionMethod->isConstructor() fails for inherited classes)
3--FILE--
4<?php
5
6class Root
7{
8	function Root() {}
9}
10class Base extends Root
11{
12	function __construct() {}
13}
14class Derived extends Base
15{
16}
17$a = new ReflectionMethod('Root','Root');
18$b = new ReflectionMethod('Base','Root');
19$c = new ReflectionMethod('Base','__construct');
20$d = new ReflectionMethod('Derived','Root');
21$e = new ReflectionMethod('Derived','__construct');
22var_dump($a->isConstructor());
23var_dump($b->isConstructor());
24var_dump($c->isConstructor());
25var_dump($d->isConstructor());
26var_dump($e->isConstructor());
27?>
28===DONE===
29--EXPECT--
30bool(true)
31bool(false)
32bool(true)
33bool(false)
34bool(true)
35===DONE===
36