public function testProducerFirst() { $app = new Core\App(); $app->link('database', Core\Database::connect()); $app->link('cachemanager', Core\Cache::init()); $app->link('success', true); Core\Sharer::share('app', $app); $test = Core\Sharer::get(); if ($test['app']->success == true) { $this->assertTrue(true); } else { $this->assertTrue(false); } $this->assertTrue(true); return 'first'; }
|-------------------------------------------------------------------------- | | This is our favourite part. Minimize the resource usage, maximize our | capabilities. | */ $app->link('cachemanager', Core\Cache::init()); /* |-------------------------------------------------------------------------- | Share the Singleton $app with the Template Files |-------------------------------------------------------------------------- | | Eliminate complexity, get the job done. | */ Core\Sharer::share('app', $app); /* |-------------------------------------------------------------------------- | Dispatch the Router |-------------------------------------------------------------------------- | | Ta Da! We can see something now! | */ include DSS_PATH . 'app/routes.php'; Core\Router::dispatch(); /* |-------------------------------------------------------------------------- | Display the Execution Time |-------------------------------------------------------------------------- |