$app->abort(405); }; expect($closure)->toThrow(new Siphon\Exception\HttpException(405)); }); it("aborts the current request with a NotFoundHttpException", function () { $closure = function () { $app = new Application(); $app->abort(404); }; expect($closure)->toThrow(new Siphon\Exception\NotFoundHttpException()); }); }); describe("default registered service definitions", function () { it("returns the default registered services", function () { $app = new Application(); $app->boot(); expect($app['app'] === $app)->toBe(true); expect($app)->toBeAnInstanceOf('Siphon\\ApplicationInterface')->toBeAnInstanceOf('Siphon\\Container\\ContainerInterface')->toBeAnInstanceOf('Symfony\\Component\\HttpKernel\\HttpKernelInterface')->toBeAnInstanceOf('Symfony\\Component\\HttpKernel\\TerminableInterface'); expect($app->get('router'))->toBeAnInstanceOf('Siphon\\Route\\RouteCollection'); expect($app['Siphon\\Event\\DispatcherInterface'])->toBeAnInstanceOf('Siphon\\Event\\Dispatcher'); expect($app['Siphon\\Event\\Dispatcher'])->toBeAnInstanceOf('Siphon\\Event\\Dispatcher'); expect($app['event'])->toBeAnInstanceOf('Siphon\\Event\\Dispatcher'); expect($app['Georgeff\\Filesystem\\File'])->toBeAnInstanceOf('Georgeff\\Filesystem\\File'); expect($app['Georgeff\\Filesystem\\Directory'])->toBeAnInstanceOf('Georgeff\\Filesystem\\Directory'); expect($app['Georgeff\\Filesystem\\Factory'])->toBeAnInstanceOf('Georgeff\\Filesystem\\Factory'); expect($app['file'])->toBeAnInstanceOf('Georgeff\\Filesystem\\File'); expect($app['directory'])->toBeAnInstanceOf('Georgeff\\Filesystem\\Directory'); expect($app['filesystem'])->toBeAnInstanceOf('Georgeff\\Filesystem\\Factory'); expect($app['Siphon\\Config\\RepositoryInterface'])->toBeAnInstanceOf('Siphon\\Config\\RepositoryInterface'); expect($app['Siphon\\Config\\Repository'])->toBeAnInstanceOf('Siphon\\Config\\Repository'); expect($app['Siphon\\Config\\Loader'])->toBeAnInstanceOf('Siphon\\Config\\Loader');