summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bug76700.phpt
blob: 5b746d56719a17631fc7538c85c78045922e9279 (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
31
--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