示例#1
0
文件: ScopeTest.php 项目: mvc5/tests
 /**
  *
  */
 function test_scope()
 {
     /** @var App $plugins */
     $provider = new Scope(Config::class, []);
     $resolver = new Resolver();
     list($service, $plugins, $name) = $resolver->args($provider->args());
     $plugin = $provider->scope($service, $plugins, $name);
     $this->assertInstanceOf(Config::class, $plugin);
     $this->assertEquals($plugin, $plugins->scope());
 }
示例#2
0
 /**
  * @param array|Resolvable $plugins
  * @param array $extra
  */
 function __construct($plugins, array $extra = [])
 {
     parent::__construct(RequestConfig::class, new Plugin(App::class, [new Args([Arg::SERVICES => $plugins]), new Plugins($extra, null), true, true]), new ApacheRequest($_GET, $_POST, [], $_COOKIE, $_FILES, $_SERVER));
 }