Skip to content

Commit e0b49d2

Browse files
authored
Laravel7 (#431)
* 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
1 parent a642456 commit e0b49d2

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@
1313
}
1414
],
1515
"require": {
16-
"php": "^7.1.3",
16+
"php": "^7.2.5",
1717
"creativeorange/gravatar": "~1.0",
18-
"laravel/framework": "6.*",
18+
"laravel/framework": "^7.0",
1919
"acacha/filesystem": "^0.1.2",
2020
"acacha/helpers": "^0.1.4",
21-
"league/flysystem": "^1.0"
21+
"league/flysystem": "^1.0",
22+
"laravel/ui": "^2.1"
2223
},
2324
"require-dev": {
24-
"phpunit/phpunit": "~7.0",
25+
"phpunit/phpunit": "^8.5",
2526
"squizlabs/php_codesniffer": "^3.2.3",
26-
"laravel/dusk": "^3.0"
27+
"laravel/dusk": "^6.0"
2728
},
2829
"autoload": {
2930
"psr-4": {"Acacha\\AdminLTETemplateLaravel\\": "src"}

routes/web.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
| contains the "web" middleware group. Now create something great!
1111
|
1212
*/
13+
Auth::routes();
1314

1415
Route::get('/', function () {
1516
return view('welcome');

src/Http/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* RouteServiceProvider
77
*/
88
Route::group(['middleware' => 'web'], function () {
9-
Route::auth();
9+
// Route::auth();
1010

1111
Route::get('/home', 'HomeController@index');
1212
});

src/Providers/AdminLTETemplateServiceProvider.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace Acacha\AdminLTETemplateLaravel\Providers;
44

55
use Illuminate\Routing\Router;
6+
use Illuminate\Container\Container;
67
use Illuminate\Support\ServiceProvider;
78
use Creativeorange\Gravatar\Facades\Gravatar;
8-
use Illuminate\Console\DetectsApplicationNamespace;
99
use Acacha\AdminLTETemplateLaravel\Facades\AdminLTE;
1010
use Creativeorange\Gravatar\GravatarServiceProvider;
1111
use Acacha\AdminLTETemplateLaravel\Http\Middleware\GuestUser;
@@ -15,8 +15,7 @@
1515
*/
1616
class AdminLTETemplateServiceProvider extends ServiceProvider
1717
{
18-
use DetectsApplicationNamespace;
19-
18+
2019
/**
2120
* Register the application services.
2221
*/
@@ -111,7 +110,7 @@ protected function defineRoutes()
111110
if (!$this->app->routesAreCached()) {
112111
$router = app('router');
113112

114-
$router->group(['namespace' => $this->getAppNamespace().'Http\Controllers'], function () {
113+
$router->group(['namespace' => Container::getInstance()->getNamespace().'Http\Controllers'], function () {
115114
require __DIR__.'/../Http/routes.php';
116115
});
117116
}

tests/Browser/AcachaAdmintLTELaravelTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ public function testSendPasswordReset()
380380
$browser->visit('password/reset')
381381
->type('email', $user->email)
382382
->press('Send Password Reset Link')
383-
->waitFor('div.alert-success')
384-
->assertSeeIn('div.alert-success', 'We have e-mailed your password reset link!');
383+
->pause(1000)
384+
->assertDontSee('We can\'t find a user with that email address.');
385385
});
386386
}
387387

@@ -397,7 +397,7 @@ public function testSendPasswordResetUserNotExists()
397397
->type('email', '[email protected]')
398398
->press('Send Password Reset Link')
399399
->pause(1000)
400-
->assertSee('We can\'t find a user with that e-mail address.');
400+
->assertSee('We can\'t find a user with that email address.');
401401
});
402402
}
403403

tests/Feature/AcachaAdminLTELaravelTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function testNewUserRegistration()
166166
'password_confirmation' => 'passw0RD',
167167
]);
168168

169-
$response->assertStatus(302);
169+
$response->assertSuccessful();
170170

171171
$this->assertDatabaseHas('users', [
172172
'name' => 'Sergi Tur Badenas',
@@ -213,7 +213,7 @@ public function testLogin()
213213
'password' => 'passw0RD',
214214
]);
215215

216-
$response->assertStatus(302);
216+
$response->assertSuccessful();
217217
}
218218

219219
/**

0 commit comments

Comments
 (0)