xref: /php-ast/tests/get_kind_name.phpt (revision 50d49a31)
1--TEST--
2Test ast\get_kind_name()
3--FILE--
4<?php
5
6var_dump(ast\get_kind_name(ast\AST_VAR));
7var_dump(ast\get_kind_name(ast\AST_NAME));
8var_dump(ast\get_kind_name(ast\AST_CLOSURE_VAR));
9
10try {
11    var_dump(ast\get_kind_name(12345));
12} catch (LogicException $e) {
13    echo $e->getMessage(), "\n";
14}
15
16?>
17--EXPECT--
18string(7) "AST_VAR"
19string(8) "AST_NAME"
20string(15) "AST_CLOSURE_VAR"
21Unknown kind 12345
22