summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bug76700.phpt
blob: a9797f3c9e2ab3974c4bf072b029d9001b190d67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--TEST--
Bug #76700 (false-positive "Error: Call to protected method" when using trait aliases)
--FILE--
<?php
trait T1
{
    protected function aa() { echo 123; }
}

trait T2
{
    use T1 {
        aa as public;
    }
}

class A
{
    use T1;
}

class B extends A
{
    use T2;
}

$b = new B();
$b->aa();
--EXPECT--
123