Annotation of embedaddon/php/ext/reflection/tests/ReflectionParameter_export_error3.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: ReflectionParameter::export() with incorrect second parameter
3: --CREDITS--
4: Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
5: --FILE--
6: <?php
7: function ReflectionParameterTest($test, $test2 = null) {
8: echo $test;
9: }
10: $reflect = new ReflectionFunction('ReflectionParameterTest');
11: $params = $reflect->getParameters();
12: foreach($params as $key => $value) {
13: ReflectionParameter::export('ReflectionParameterTest', 'incorrect_parameter');
14: }
15: --EXPECTF--
16:
17: Fatal error: Uncaught exception 'ReflectionException' with message 'The parameter specified by its name could not be found' in %s.php:%d
18: Stack trace:
19: #0 [internal function]: ReflectionParameter->__construct('ReflectionParam...', 'incorrect_param...')
20: #1 %s.php(%d): ReflectionParameter::export('ReflectionParam...', 'incorrect_param...')
21: #2 {main}
22: thrown in %s.php on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>