~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to tests/reflection/bug30148.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Bug #30148 (ReflectionMethod->isConstructor() fails for inherited classes)
 
3
--FILE--
 
4
<?php
 
5
 
 
6
class Root
 
7
{
 
8
        function Root() {}
 
9
}
 
10
class Base extends Root
 
11
{
 
12
        function __construct() {}
 
13
}
 
14
class 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');
 
22
var_dump($a->isConstructor());
 
23
var_dump($b->isConstructor());
 
24
var_dump($c->isConstructor());
 
25
var_dump($d->isConstructor());
 
26
var_dump($e->isConstructor());
 
27
?>
 
28
===DONE===
 
29
--EXPECT--
 
30
bool(true)
 
31
bool(false)
 
32
bool(true)
 
33
bool(false)
 
34
bool(true)
 
35
===DONE===
 
 
b'\\ No newline at end of file'