1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 11:42:17 +02:00
Files
archived-php-src/ext/reflection/tests/ReflectionEnum_toString.phpt
Ilija Tovilo 269c8dac1d Implement enums
RFC: https://wiki.php.net/rfc/enumerations

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

Closes GH-6489.
2021-03-17 19:08:03 +01:00

40 lines
588 B
PHP

--TEST--
ReflectionEnum::__toString()
--FILE--
<?php
enum Foo {
case Bar;
}
echo new ReflectionEnum(Foo::class);
?>
--EXPECTF--
Class [ <user> final class Foo implements UnitEnum ] {
@@ %sReflectionEnum_toString.php 3-5
- Constants [1] {
Constant [ public Foo Bar ] { Object }
}
- Static properties [0] {
}
- Static methods [1] {
Method [ <internal, prototype UnitEnum> static public method cases ] {
- Parameters [0] {
}
- Return [ array ]
}
}
- Properties [1] {
Property [ public string $name ]
}
- Methods [0] {
}
}