Skip to content

Commit

Permalink
Laravel7 (#431)
Browse files Browse the repository at this point in the history
* Bump laravel 7

* Change getNamespace functionality

* No auth routes

* Add auth routes

* Update feature tests

* Update Browser test

* Dusk not showing popup

* Add laravel ui dependency
  • Loading branch information
manelgavalda committed Jul 20, 2020
1 parent a642456 commit e0b49d2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
11 changes: 6 additions & 5 deletions composer.json
Expand Up @@ -13,17 +13,18 @@
}
],
"require": {
"php": "^7.1.3",
"php": "^7.2.5",
"creativeorange/gravatar": "~1.0",
"laravel/framework": "6.*",
"laravel/framework": "^7.0",
"acacha/filesystem": "^0.1.2",
"acacha/helpers": "^0.1.4",
"league/flysystem": "^1.0"
"league/flysystem": "^1.0",
"laravel/ui": "^2.1"
},
"require-dev": {
"phpunit/phpunit": "~7.0",
"phpunit/phpunit": "^8.5",
"squizlabs/php_codesniffer": "^3.2.3",
"laravel/dusk": "^3.0"
"laravel/dusk": "^6.0"
},
"autoload": {
"psr-4": {"Acacha\\AdminLTETemplateLaravel\\": "src"}
Expand Down
1 change: 1 addition & 0 deletions routes/web.php
Expand Up @@ -10,6 +10,7 @@
| contains the "web" middleware group. Now create something great!
|
*/
Auth::routes();

Route::get('/', function () {
return view('welcome');
Expand Down
2 changes: 1 addition & 1 deletion src/Http/routes.php
Expand Up @@ -6,7 +6,7 @@
* RouteServiceProvider
*/
Route::group(['middleware' => 'web'], function () {
Route::auth();
// Route::auth();

Route::get('/home', 'HomeController@index');
});
7 changes: 3 additions & 4 deletions src/Providers/AdminLTETemplateServiceProvider.php
Expand Up @@ -3,9 +3,9 @@
namespace Acacha\AdminLTETemplateLaravel\Providers;

use Illuminate\Routing\Router;
use Illuminate\Container\Container;
use Illuminate\Support\ServiceProvider;
use Creativeorange\Gravatar\Facades\Gravatar;
use Illuminate\Console\DetectsApplicationNamespace;
use Acacha\AdminLTETemplateLaravel\Facades\AdminLTE;
use Creativeorange\Gravatar\GravatarServiceProvider;
use Acacha\AdminLTETemplateLaravel\Http\Middleware\GuestUser;
Expand All @@ -15,8 +15,7 @@
*/
class AdminLTETemplateServiceProvider extends ServiceProvider
{
use DetectsApplicationNamespace;


/**
* Register the application services.
*/
Expand Down Expand Up @@ -111,7 +110,7 @@ protected function defineRoutes()
if (!$this->app->routesAreCached()) {
$router = app('router');

$router->group(['namespace' => $this->getAppNamespace().'Http\Controllers'], function () {
$router->group(['namespace' => Container::getInstance()->getNamespace().'Http\Controllers'], function () {
require __DIR__.'/../Http/routes.php';
});
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Browser/AcachaAdmintLTELaravelTest.php
Expand Up @@ -380,8 +380,8 @@ public function testSendPasswordReset()
$browser->visit('password/reset')
->type('email', $user->email)
->press('Send Password Reset Link')
->waitFor('div.alert-success')
->assertSeeIn('div.alert-success', 'We have e-mailed your password reset link!');
->pause(1000)
->assertDontSee('We can\'t find a user with that email address.');
});
}

Expand All @@ -397,7 +397,7 @@ public function testSendPasswordResetUserNotExists()
->type('email', 'notexistingemail@gmail.com')
->press('Send Password Reset Link')
->pause(1000)
->assertSee('We can\'t find a user with that e-mail address.');
->assertSee('We can\'t find a user with that email address.');
});
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Feature/AcachaAdminLTELaravelTest.php
Expand Up @@ -166,7 +166,7 @@ public function testNewUserRegistration()
'password_confirmation' => 'passw0RD',
]);

$response->assertStatus(302);
$response->assertSuccessful();

$this->assertDatabaseHas('users', [
'name' => 'Sergi Tur Badenas',
Expand Down Expand Up @@ -213,7 +213,7 @@ public function testLogin()
'password' => 'passw0RD',
]);

$response->assertStatus(302);
$response->assertSuccessful();
}

/**
Expand Down

0 comments on commit e0b49d2

Please sign in to comment.