1--TEST--
2Test default value handling of ErrorException::__construct()
3--FILE--
4<?php
5
6$e = new ErrorException();
7var_dump($e->getMessage());
8var_dump($e->getFile());
9var_dump($e->getLine());
10
11$e = new ErrorException("Second", 0, E_ERROR, null);
12var_dump($e->getMessage());
13var_dump($e->getFile());
14var_dump($e->getLine());
15
16$e = new ErrorException("Third", 0, E_ERROR, null, null);
17var_dump($e->getMessage());
18var_dump($e->getFile());
19var_dump($e->getLine());
20
21$e = new ErrorException("Forth", 0, E_ERROR, null, 123);
22var_dump($e->getMessage());
23var_dump($e->getFile());
24var_dump($e->getLine());
25
26$e = new ErrorException("Fifth", 0, E_ERROR, "abc.php");
27var_dump($e->getMessage());
28var_dump($e->getFile());
29var_dump($e->getLine());
30
31$e = new ErrorException("Sixth", 0, E_ERROR, "abc.php", null);
32var_dump($e->getMessage());
33var_dump($e->getFile());
34var_dump($e->getLine());
35
36$e = new ErrorException("Seventh", 0, E_ERROR, "abc.php", 123);
37var_dump($e->getMessage());
38var_dump($e->getFile());
39var_dump($e->getLine());
40
41?>
42--EXPECTF--
43string(0) ""
44string(%d) "%sErrorException_construct.php"
45int(3)
46string(6) "Second"
47string(%d) "%sErrorException_construct.php"
48int(8)
49string(5) "Third"
50string(%d) "%sErrorException_construct.php"
51int(13)
52string(5) "Forth"
53string(%d) "%sErrorException_construct.php"
54int(123)
55string(5) "Fifth"
56string(7) "abc.php"
57int(0)
58string(5) "Sixth"
59string(7) "abc.php"
60int(0)
61string(7) "Seventh"
62string(7) "abc.php"
63int(123)
64