1--TEST-- 2ReflectionEnumUnitCase::getDocComment() 3--FILE-- 4<?php 5// enum cases should support doc comments, like class constants. 6 7enum Foo { 8 /** Example doc comment */ 9 case Bar; 10 case Baz; 11} 12 13var_dump((new ReflectionEnumUnitCase(Foo::class, 'Bar'))->getDocComment()); 14var_dump((new ReflectionEnumUnitCase(Foo::class, 'Baz'))->getDocComment()); 15var_dump((new ReflectionClassConstant(Foo::class, 'Bar'))->getDocComment()); 16var_dump((new ReflectionClassConstant(Foo::class, 'Baz'))->getDocComment()); 17 18?> 19--EXPECT-- 20string(26) "/** Example doc comment */" 21bool(false) 22string(26) "/** Example doc comment */" 23bool(false) 24