PHP Classes

File: vendor/pimple/pimple/ext/pimple/tests/009.phpt

Recommend this page to a friend!
  Classes of uche   Farm Price   vendor/pimple/pimple/ext/pimple/tests/009.phpt   Download  
File: vendor/pimple/pimple/ext/pimple/tests/009.phpt
Role: Example script
Content type: text/plain
Description: Example script
Class: Farm Price
API to get the prices from agriculture markets
Author: By
Last change:
Date: 2 years ago
Size: 337 bytes
 

Contents

Class file image Download
--TEST--
Test service is called as callback, and only once
--SKIPIF--
<?php if (!extension_loaded("pimple")) print "skip"; ?>
--FILE--
<?php
$p
= new Pimple\Container();
$p['foo'] = function($arg) use ($p) { var_dump($p === $arg); };
$a = $p['foo'];
$b = $p['foo']; /* should return not calling the callback */
?>
--EXPECTF--
bool(true)