File: node_constructor_throw.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 (14 lines) | stat: -rw-r--r-- 251 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--TEST--
new ast\Node() throwing
--SKIPIF--
<?php if (!extension_loaded("ast")) print "skip"; ?>
--FILE--
<?php

try {
    new ast\Node('invalid');
} catch (TypeError $e) {
    echo "Caught {$e->getMessage()}\n";
}
--EXPECTF--
Caught %s, string given