diff --git a/app/routes.php b/app/routes.php index 12a48744a..e7bffa8c8 100644 --- a/app/routes.php +++ b/app/routes.php @@ -26,21 +26,6 @@ */ -// test routes -Route::get('hello', array( - 'as' => 'hello', - 'uses' => 'GrahamCampbell\BootstrapCMS\Controllers\HomeController@showWelcome' -)); -Route::get('test', array( - 'as' => 'test', - 'uses' => 'GrahamCampbell\BootstrapCMS\Controllers\HomeController@showTest' -)); -Route::get('testqueue', array( - 'as' => 'testqueue', - 'uses' => 'GrahamCampbell\BootstrapCMS\Controllers\HomeController@testQueue' -)); - - // send users to the home page Route::get('/', array('as' => 'base', function () { Session::flash('', ''); // work around laravel bug if there is no session yet diff --git a/app/views/index.blade.php b/app/views/index.blade.php deleted file mode 100644 index 7b56f476c..000000000 --- a/app/views/index.blade.php +++ /dev/null @@ -1,17 +0,0 @@ -@extends(Config::get('views.default', 'layouts.default')) - -@section('title') -Hello World -@stop - -@section('top') - -@stop - -@section('content') -

- This is the {{{ Config::get('platform.name') }}} test page. -

-@stop diff --git a/src/BootstrapCMSServiceProvider.php b/src/BootstrapCMSServiceProvider.php index e3dcf036e..c1620644d 100644 --- a/src/BootstrapCMSServiceProvider.php +++ b/src/BootstrapCMSServiceProvider.php @@ -89,7 +89,6 @@ public function register() $this->registerNavigationSubscriber(); $this->registerCommentController(); - $this->registerHomeController(); $this->registerPageController(); } @@ -258,22 +257,6 @@ protected function registerCommentController() }); } - /** - * Register the home controller class. - * - * @return void - */ - protected function registerHomeController() - { - $this->app->bind('GrahamCampbell\BootstrapCMS\Controllers\HomeController', function ($app) { - $email = $app['config']['workbench.email']; - $subject = $app['config']['platform.name'].' - Welcome'; - $path = $app['config']['graham-campbell/core::home']; - - return new Controllers\HomeController($email, $subject, $path); - }); - } - /** * Register the page controller class. * diff --git a/src/Controllers/CommentController.php b/src/Controllers/CommentController.php index 8e08e5cb1..05ac26803 100644 --- a/src/Controllers/CommentController.php +++ b/src/Controllers/CommentController.php @@ -245,20 +245,4 @@ protected function checkComment($comment) throw new NotFoundHttpException('Comment Not Found'); } } - - /** - * Check the post model. - * - * @param mixed $post - * - * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException - * - * @return void - */ - protected function checkPost($post) - { - if (!$post) { - throw new NotFoundHttpException('Post Not Found'); - } - } } diff --git a/src/Controllers/HomeController.php b/src/Controllers/HomeController.php deleted file mode 100644 index de26973e4..000000000 --- a/src/Controllers/HomeController.php +++ /dev/null @@ -1,115 +0,0 @@ - - * @copyright 2013-2014 Graham Campbell - * @license AGPL 3.0 - */ -class HomeController extends AbstractController -{ - /** - * The email address. - * - * @var string - */ - protected $email; - - /** - * The email subject. - * - * @var string - */ - protected $subject; - - /** - * The home page path. - * - * @var string - */ - protected $path; - - /** - * Create a new instance. - * - * @param string $email - * @param string $subject - * @param string $path - * - * @return void - */ - public function __construct($email, $subject, $path) - { - $this->email = $email; - $this->subject = $subject; - $this->path = $path; - - $this->setPermissions(array( - 'testQueue' => 'admin' - )); - - parent::__construct(); - } - - /** - * Show the hello world page. - * - * @return \Illuminate\View\View - */ - public function showWelcome() - { - return View::make('index'); - } - - /** - * Show the test page. - * - * @return string - */ - public function showTest() - { - return 'Test 123!'; - } - - /** - * Send a test activation email. - * - * @return string - */ - public function testQueue() - { - $mail = array( - 'url' => URL::to($this->path), - 'link' => URL::route('account.activate', array('id' => 1, 'code' => 1234)), - 'email' => $this->email, - 'subject' => $this->subject - ); - - Mail::queue('graham-campbell/credentials::emails.welcome', $mail, function ($message) use ($mail) { - $message->to($mail['email'])->subject($mail['subject']); - }); - - return 'The message has been queued for sending.'; - } -} diff --git a/tests/Acceptance/AbstractTestCase.php b/tests/Acceptance/AbstractTestCase.php index 5c0ffacd8..c451b7f8d 100644 --- a/tests/Acceptance/AbstractTestCase.php +++ b/tests/Acceptance/AbstractTestCase.php @@ -34,34 +34,18 @@ abstract class AbstractTestCase extends BaseTestCase */ protected function start() { - file_put_contents(storage_path('temp.sqlite'), ''); - - $this->readyApp(); - $this->app['artisan']->call('app:install'); } - protected function readyApp() - { - $this->app['config']->set('database.connections.sqlite.database', storage_path('temp.sqlite')); - $this->app['router']->enableFilters(); - - } - protected function callAgain() { $this->refreshApplication(); - $this->readyApp(); + $this->start(); return call_user_func_array(array($this, 'call'), func_get_args()); } - protected function login($id = 1) - { - $this->app['credentials']->login($this->app['userprovider']->find($id)); - } - /** * Run extra tear down code. *