Annotation of embedaddon/php/ext/standard/tests/directory/DirectoryClass_basic_001.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Directory class behaviour.
                      3: --FILE--
                      4: <?php
                      5: /* 
                      6:  * Prototype: object dir(string directory[, resource context])
                      7:  * Description: Directory class with properties, handle and class and methods read, rewind and close
                      8:  * Class is defined in ext/standard/dir.c
                      9:  */
                     10: 
                     11: echo "Structure of Directory class:\n";
                     12: $rc = new ReflectionClass("Directory");
                     13: echo $rc;
                     14: 
                     15: echo "Cannot instantiate a valid Directory directly:\n";
                     16: $d = new Directory(getcwd());
                     17: var_dump($d);
                     18: var_dump($d->read());
                     19: 
                     20: ?>
                     21: --EXPECTF--
                     22: Structure of Directory class:
                     23: Class [ <internal%s> class Directory ] {
                     24: 
                     25:   - Constants [0] {
                     26:   }
                     27: 
                     28:   - Static properties [0] {
                     29:   }
                     30: 
                     31:   - Static methods [0] {
                     32:   }
                     33: 
                     34:   - Properties [0] {
                     35:   }
                     36: 
                     37:   - Methods [3] {
                     38:     Method [ <internal:standard> public method close ] {
                     39: 
                     40:       - Parameters [1] {
                     41:         Parameter #0 [ <optional> $dir_handle ]
                     42:       }
                     43:     }
                     44: 
                     45:     Method [ <internal:standard> public method rewind ] {
                     46: 
                     47:       - Parameters [1] {
                     48:         Parameter #0 [ <optional> $dir_handle ]
                     49:       }
                     50:     }
                     51: 
                     52:     Method [ <internal:standard> public method read ] {
                     53: 
                     54:       - Parameters [1] {
                     55:         Parameter #0 [ <optional> $dir_handle ]
                     56:       }
                     57:     }
                     58:   }
                     59: }
                     60: Cannot instantiate a valid Directory directly:
                     61: object(Directory)#%d (0) {
                     62: }
                     63: 
                     64: Warning: Directory::read(): Unable to find my handle property in %s on line 15
                     65: bool(false)

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