Annotation of embedaddon/php/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: ReflectionParameter::__construct(): Invalid method as constructor
                      3: --FILE-- 
                      4: <?php
                      5: 
                      6: // Invalid class name
                      7: try {
                      8:        new ReflectionParameter (array ('A', 'b'), 0);
                      9: } catch (ReflectionException $e) { echo $e->getMessage ()."\n"; }
                     10: 
                     11: // Invalid class method
                     12: try {
                     13:        new ReflectionParameter (array ('C', 'b'), 0);
                     14: } catch (ReflectionException $e) { echo $e->getMessage ()."\n"; }
                     15: 
                     16: // Invalid object method
                     17: try {
                     18:        new ReflectionParameter (array (new C, 'b'), 0);
                     19: } catch (ReflectionException $e) { echo $e->getMessage ()."\n"; }
                     20: 
                     21: echo "Done.\n";
                     22: 
                     23: class C {
                     24: }
                     25: 
                     26: ?>
                     27: --EXPECTF--
                     28: Class A does not exist
                     29: Method C::b() does not exist
                     30: Method C::b() does not exist
                     31: Done.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>