public function testInvokeResolutionFailedTypedArgument() { // Expect $this->expectException(ParameterResolutionException::class); // Act $this->app->make(RecursiveIteratorIterator::class); }
/** * Registers entries with the container. * @param Container $app */ public function register(Container $app) { // old session $app[Session::class] = $app->make(Session::class); // old config $app[Config::class] = $app->one(Config::class); // old text system $app[Text::class] = $app->once(function (Config $config) use($app) { $args = []; if ($config->configExists('main', 'language_text')) { $args[] = $config->config('language_text'); } return $app->make(Text::class, $args); }); // Old database system $app[Database::class] = $app->one(Database::class); // Default style renderer $app[RendererInterface::class] = $app->one(Page::class); // Global Data $app[GlobalData::class] = new GlobalData($app); }