diff options
Diffstat (limited to 'ext/reflection/tests/ReflectionEnumUnitCase_getEnum.phpt')
-rw-r--r-- | ext/reflection/tests/ReflectionEnumUnitCase_getEnum.phpt | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ext/reflection/tests/ReflectionEnumUnitCase_getEnum.phpt b/ext/reflection/tests/ReflectionEnumUnitCase_getEnum.phpt new file mode 100644 index 0000000000..3d3bcc227e --- /dev/null +++ b/ext/reflection/tests/ReflectionEnumUnitCase_getEnum.phpt @@ -0,0 +1,39 @@ +--TEST-- +ReflectionEnumUnitCase::getEnum() +--FILE-- +<?php + +enum Foo { + case Bar; +} + +echo (new ReflectionEnumUnitCase(Foo::class, 'Bar'))->getEnum(); + +?> +--EXPECTF-- +Class [ <user> final class Foo implements UnitEnum ] { + @@ %sReflectionEnumUnitCase_getEnum.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] { + } +} |