PHP Classes

File: libraries/vendor/pimple/pimple/ext/pimple/tests/017.phpt

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   PHP Slim Framework 3 Modular Application   libraries/vendor/pimple/pimple/ext/pimple/tests/017.phpt   Download  
File: libraries/vendor/pimple/pimple/ext/pimple/tests/017.phpt
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Slim Framework 3 Modular Application
Create modular applications using Slim Framework
Author: By
Last change:
Date: 7 years ago
Size: 383 bytes
 

Contents

Class file image Download
--TEST--
Test extend() with exception in service extension
--SKIPIF--
<?php if (!extension_loaded("pimple")) print "skip"; ?>
--FILE--
<?php

$p
= new Pimple\Container();
$p[12] = function ($v) { return 'foo';};

$c = $p->extend(12, function ($w) { throw new BadMethodCallException; });

try {
   
$p[12];
    echo
"Exception expected";
} catch (
BadMethodCallException $e) { }
--
EXPECTF--