xref: /PHP-7.1/Zend/tests/exception_010.phpt (revision 64b167d2)
1--TEST--
2Testing Exception's methods
3--FILE--
4<?php
5
6$x = new Exception;
7$x->gettraceasstring(1);
8$x->gettraceasstring();
9$x->__tostring(1);
10$x->gettrace(1);
11$x->getline(1);
12$x->getfile(1);
13$x->getmessage(1);
14$x->getcode(1);
15
16?>
17--EXPECTF--
18Warning: Exception::getTraceAsString() expects exactly 0 parameters, 1 given in %s on line %d
19
20Warning: Exception::__toString() expects exactly 0 parameters, 1 given in %s on line %d
21
22Warning: Exception::getTrace() expects exactly 0 parameters, 1 given in %s on line %d
23
24Warning: Exception::getLine() expects exactly 0 parameters, 1 given in %s on line %d
25
26Warning: Exception::getFile() expects exactly 0 parameters, 1 given in %s on line %d
27
28Warning: Exception::getMessage() expects exactly 0 parameters, 1 given in %s on line %d
29
30Warning: Exception::getCode() expects exactly 0 parameters, 1 given in %s on line %d
31