1--TEST--
2Test ReflectionProperty class constructor errors.
3--FILE--
4<?php
5
6class TestClass {
7}
8
9$a = 5;
10
11echo "Non-existent class:\n";
12try {
13    new ReflectionProperty("NonExistentClass", "prop");
14} catch (ReflectionException $e) {
15    echo $e->getMessage();
16}
17
18echo "\n\nWrong property parameter type:\n";
19try {
20    new ReflectionProperty($a, 'TestClass');
21}
22catch(ReflectionException $e) {
23    echo $e->getMessage();
24}
25
26echo "\n\nNon-existent property:\n";
27try {
28    new ReflectionProperty('TestClass', "nonExistentProperty");
29}
30catch(ReflectionException $e) {
31    echo $e->getMessage();
32}
33
34?>
35--EXPECT--
36Non-existent class:
37Class "NonExistentClass" does not exist
38
39Wrong property parameter type:
40Class "5" does not exist
41
42Non-existent property:
43Property TestClass::$nonExistentProperty does not exist
44