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    $propInfo = new ReflectionProperty("NonExistentClass", "prop");
14}
15catch(Exception $e) {
16    echo $e->getMessage();
17}
18
19echo "\n\nWrong property parameter type:\n";
20try {
21    $propInfo = new ReflectionProperty($a, 'TestClass');
22}
23catch(ReflectionException $e) {
24    echo $e->getMessage();
25}
26
27echo "\n\nNon-existent property:\n";
28try {
29    $propInfo = new ReflectionProperty('TestClass', "nonExistentProperty");
30}
31catch(Exception $e) {
32    echo $e->getMessage();
33}
34
35?>
36--EXPECT--
37Non-existent class:
38Class NonExistentClass does not exist
39
40Wrong property parameter type:
41The parameter class is expected to be either a string or an object
42
43Non-existent property:
44Property TestClass::$nonExistentProperty does not exist
45