File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / reflection / tests / bug30148.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:00 2012 UTC (12 years, 6 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
Reflection Bug #30148 (ReflectionMethod->isConstructor() fails for inherited classes)
--FILE--
<?php

class Root
{
	function Root() {}
}
class Base extends Root
{
	function __construct() {}
}
class Derived extends Base
{
}
$a = new ReflectionMethod('Root','Root');
$b = new ReflectionMethod('Base','Root');
$c = new ReflectionMethod('Base','__construct');
$d = new ReflectionMethod('Derived','Root');
$e = new ReflectionMethod('Derived','__construct');
var_dump($a->isConstructor());
var_dump($b->isConstructor());
var_dump($c->isConstructor());
var_dump($d->isConstructor());
var_dump($e->isConstructor());
?>
===DONE===
--EXPECT--
bool(true)
bool(false)
bool(true)
bool(false)
bool(true)
===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>