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

1.1       misho       1: --TEST--
                      2: ReflectionClass::__constructor()
                      3: --FILE--
                      4: <?php
                      5: $r1 = new ReflectionClass("stdClass");
                      6: 
                      7: $myInstance = new stdClass;
                      8: $r2 = new ReflectionClass($myInstance);
                      9: 
                     10: class TrickClass {
                     11:        function __toString() {
                     12:                //Return the name of another class
                     13:                return "Exception";
                     14:        }
                     15: }
                     16: $myTrickClass = new TrickClass;
                     17: $r3 = new ReflectionClass($myTrickClass);
                     18: 
                     19: var_dump($r1, $r2, $r3);
                     20: ?>
                     21: --EXPECTF--
                     22: object(ReflectionClass)#%d (1) {
                     23:   ["name"]=>
                     24:   string(8) "stdClass"
                     25: }
                     26: object(ReflectionClass)#%d (1) {
                     27:   ["name"]=>
                     28:   string(8) "stdClass"
                     29: }
                     30: object(ReflectionClass)#%d (1) {
                     31:   ["name"]=>
                     32:   string(10) "TrickClass"
                     33: }

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