Annotation of embedaddon/php/ext/spl/tests/spl_autoload_006.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: SPL: spl_autoload() with static methods
                      3: --INI--
                      4: include_path=.
                      5: --FILE--
                      6: <?php
                      7: 
                      8: class MyAutoLoader {
                      9: 
                     10:         static function autoLoad($className) {
                     11:                echo __METHOD__ . "($className)\n";
                     12:         }
                     13: }
                     14: 
                     15: spl_autoload_register('MyAutoLoader::autoLoad');
                     16: 
                     17: var_dump(spl_autoload_functions());
                     18: 
                     19: // check
                     20: var_dump(class_exists("TestClass", true));
                     21: 
                     22: ?>
                     23: ===DONE===
                     24: <?php exit(0); ?>
                     25: --EXPECTF--
                     26: array(1) {
                     27:   [0]=>
                     28:   array(2) {
                     29:     [0]=>
                     30:     string(12) "MyAutoLoader"
                     31:     [1]=>
                     32:     string(8) "autoLoad"
                     33:   }
                     34: }
                     35: MyAutoLoader::autoLoad(TestClass)
                     36: bool(false)
                     37: ===DONE===

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