xref: /PHP-7.4/Zend/tests/traits/bug60173.phpt (revision d679f022)
1--TEST--
2Bug #60173 (Wrong error message on reflective trait instantiation)
3--FILE--
4<?php
5
6trait foo { }
7
8$rc = new ReflectionClass('foo');
9$rc->newInstance();
10--EXPECTF--
11Fatal error: Uncaught Error: Cannot instantiate trait foo in %s:%d
12Stack trace:
13#0 %s(%d): ReflectionClass->newInstance()
14#1 {main}
15  thrown in %s on line %d
16