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

1.1       misho       1: --TEST--
                      2: ReflectionMethod::__construct() tests
                      3: --FILE--
                      4: <?php
                      5: 
                      6: $a = array("", 1, "::", "a::", "::b", "a::b");
                      7: 
                      8: foreach ($a as $val) {
                      9:        try {
                     10:                new ReflectionMethod($val);
                     11:        } catch (Exception $e) {
                     12:                var_dump($e->getMessage());
                     13:        }
                     14: }
                     15:  
                     16: $a = array("", 1, "");
                     17: $b = array("", "", 1);
                     18:  
                     19: foreach ($a as $key=>$val) {
                     20:        try {
                     21:                new ReflectionMethod($val, $b[$key]);
                     22:        } catch (Exception $e) {
                     23:                var_dump($e->getMessage());
                     24:        }
                     25: }
                     26: 
                     27: echo "Done\n";
                     28: ?>
                     29: --EXPECTF--    
                     30: string(20) "Invalid method name "
                     31: string(21) "Invalid method name 1"
                     32: string(21) "Class  does not exist"
                     33: string(22) "Class a does not exist"
                     34: string(21) "Class  does not exist"
                     35: string(22) "Class a does not exist"
                     36: string(21) "Class  does not exist"
                     37: string(66) "The parameter class is expected to be either a string or an object"
                     38: string(21) "Class  does not exist"
                     39: Done

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