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.
17 lines
266 B
17 lines
266 B
--TEST--
|
|
Test protect()
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("pimple")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$p = new Pimple\Container();
|
|
$f = function () { return 'foo'; };
|
|
$p['foo'] = $f;
|
|
|
|
$p->protect($f);
|
|
|
|
var_dump($p['foo']);
|
|
--EXPECTF--
|
|
object(Closure)#%i (0) {
|
|
}
|