File: zpp_errors.phpt

package info (click to toggle)
php-ast 1.1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 632 kB
  • sloc: ansic: 2,173; xml: 621; php: 319; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 596 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
zpp failures throw TypeError
--FILE--
<?php

try { ast\parse_code(); }
catch (TypeError $e) { echo $e->getMessage(), "\n"; }
try { ast\parse_file(); }
catch (TypeError $e) { echo $e->getMessage(), "\n"; }
try { ast\get_kind_name(); }
catch (TypeError $e) { echo $e->getMessage(), "\n"; }
try { ast\kind_uses_flags(); }
catch (TypeError $e) { echo $e->getMessage(), "\n"; }

?>
--EXPECTF--
ast\parse_code() expects at least 1 %s, 0 given
ast\parse_file() expects at least 1 %s, 0 given
ast\get_kind_name() expects exactly 1 %s, 0 given
ast\kind_uses_flags() expects exactly 1 %s, 0 given