1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00
Files
archived-php-src/ext/standard/tests/directory/DirectoryClass_basic_001.phpt
Máté Kocsis 2c96780e1c Fix UNKNOWN default values in ext/standard
Closes GH-6026
2020-09-07 18:58:11 +02:00

68 lines
1.2 KiB
PHP

--TEST--
Directory class behaviour.
--FILE--
<?php
/*
* Description: Directory class with properties, handle and class and methods read, rewind and close
* Class is defined in ext/standard/dir.c
*/
echo "Structure of Directory class:\n";
$rc = new ReflectionClass("Directory");
echo $rc;
echo "Cannot instantiate a valid Directory directly:\n";
$d = new Directory(getcwd());
var_dump($d);
try {
var_dump($d->read());
} catch (\Error $e) {
echo $e->getMessage() . "\n";
}
?>
--EXPECTF--
Structure of Directory class:
Class [ <internal%s> class Directory ] {
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [0] {
}
- Methods [3] {
Method [ <internal:standard> public method close ] {
- Parameters [1] {
Parameter #0 [ <optional> $dir_handle = null ]
}
}
Method [ <internal:standard> public method rewind ] {
- Parameters [1] {
Parameter #0 [ <optional> $dir_handle = null ]
}
}
Method [ <internal:standard> public method read ] {
- Parameters [1] {
Parameter #0 [ <optional> $dir_handle = null ]
}
}
}
}
Cannot instantiate a valid Directory directly:
object(Directory)#%d (0) {
}
Unable to find my handle property