summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bug60173.phpt
blob: be7f652bf93b01f74f43321bdd3a2b2b536894f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
Bug #60173 (Wrong error message on reflective trait instantiation)
--FILE--
<?php

trait foo { }

$rc = new ReflectionClass('foo');
$rc->newInstance();
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot instantiate trait foo in %s:%d
Stack trace:
#0 %s(%d): ReflectionClass->newInstance()
#1 {main}
  thrown in %s on line %d