Commit 8f1eb55f authored by Nicolas Widart's avatar Nicolas Widart

Squashed 'Modules/Dashboard/' changes from 32a9233..464aa5e

464aa5e Added blank line at EOF.
aa33cdb Namespacing the test
a99a599 Added blank line at EOF. Refactoring the test
6438f69 Type hinting View

git-subtree-dir: Modules/Dashboard
git-subtree-split: 464aa5ececcb9bf4009778a90f4ce92b3f13ae5c
parent 564351cc
<?php namespace Modules\Dashboard\Composers;
use Illuminate\View\View;
class SidebarViewComposer
{
public function compose($view)
public function compose(View $view)
{
$view->items->put('dashboard', [
'weight' => 0,
......
......@@ -6,4 +6,3 @@ $router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'Larav
$router->get('/', ['as' => 'dashboard.index', 'uses' => 'Admin\DashboardController@index']);
});
});
......@@ -45,4 +45,3 @@ class RouteServiceProvider extends ServiceProvider
}
}
<?php
<?php namespace Modules\Dashboard\Tests;
use Cartalyst\Sentinel\Laravel\Facades\Sentinel;
use Modules\Core\Tests\BaseTestCase;
class UrlTest extends TestCase
class UrlTest extends BaseTestCase
{
/** @test */
public function testDashboardAccessible()
......@@ -10,10 +11,6 @@ class UrlTest extends TestCase
$user = Sentinel::findById(4);
Sentinel::login($user);
$crawler = $this->client->request('GET', '/' . Config::get('core::core.admin-prefix'));
$this->assertTrue($this->client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('h1:contains("Dashboard")'));
$this->checkResponseIsOkAndContains(['GET', '/' . Config::get('core::core.admin-prefix')], 'h1:contains("Dashboard")');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment