protected function setUp() { $this->app = new Application(); $this->cwd = getcwd(); $this->dir = $this->createDir(); $this->params = new ArrayObject(); $this->provider = new WiseServiceProvider(); chdir($this->dir); $this->app['wise.cache_dir'] = $this->dir; $this->app['wise.path'] = $this->dir; $this->provider->register($this->app); }
<?php $app = new Silex\Application(); $app['debug'] = true; $app['app_path'] = __DIR__ . '/..'; $app->register(new Herrera\Wise\WiseServiceProvider(), ['wise.cache_dir' => __DIR__ . '/../App/Config/Cache', 'wise.path' => __DIR__ . '/../App/Config', 'wise.options' => ['parameters' => $app, 'mode' => 'prod', 'type' => 'yml', 'config' => ['services' => 'services']]]); \Herrera\Wise\WiseServiceProvider::registerServices($app); $app['twig']->addExtension(new \Entea\Twig\Extension\AssetExtension($app)); $app->mount('/', new App\Controller\MainController()); return $app;