xref: /PHP-5.4/Zend/tests/traits/noctor001.phpt (revision 0262fdf3)
1--TEST--
2Don't mark trait methods as constructor
3--FILE--
4<?php
5trait Foo {
6    public function Foo() {
7    }
8}
9
10class Bar {
11    use Foo;
12    public function Bar() {
13    }
14}
15
16$rfoofoo = new ReflectionMethod('Foo::Foo');
17var_dump($rfoofoo->isConstructor());
18
19$rbarfoo = new ReflectionMethod('Bar::Foo');
20var_dump($rbarfoo->isConstructor());
21
22$rbarbar = new ReflectionMethod('Bar::Bar');
23var_dump($rbarbar->isConstructor());
24?>
25--EXPECT--
26bool(false)
27bool(false)
28bool(true)
29