You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
416 B
19 lines
416 B
--TEST--
|
|
Test service callback throwing an exception
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("pimple")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
class CallBackException extends RuntimeException { }
|
|
|
|
$p = new Pimple\Container();
|
|
$p['foo'] = function () { throw new CallBackException; };
|
|
try {
|
|
echo $p['foo'] . "\n";
|
|
echo "should not come here";
|
|
} catch (CallBackException $e) {
|
|
echo "all right!";
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
all right!
|