/** * */ 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()); }
/** * @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)); }