cf0ce5a01e
- use "p" for path (security check for nul byte) - fix number of args for some methods - add type hinting - throw standard exception (simplify) - fix test suite for PHP 7.0 to 8.0
21 lines
510 B
PHP
21 lines
510 B
PHP
--TEST--
|
|
Testing FaceLandmarkDetection constructor without arguments
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("pdlib")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
new FaceLandmarkDetection();
|
|
} catch (Error $e) {
|
|
var_dump($e->getMessage());
|
|
}
|
|
try {
|
|
new FaceLandmarkDetection("non-existent file");
|
|
} catch (Exception $e) {
|
|
var_dump($e->getMessage());
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
string(73) "FaceLandmarkDetection::__construct() expects exactly 1 parameter, 0 given"
|
|
string(45) "Unable to open non-existent file for reading."
|