Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-adminpanel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
laravel-adminpanel
Commits
f3dadd96
Commit
f3dadd96
authored
Mar 07, 2019
by
Viral Solani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to laravel 5.8
parent
edef02f2
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
291 additions
and
955 deletions
+291
-955
access.log
access.log
+4
-0
AppServiceProvider.php
app/Providers/AppServiceProvider.php
+0
-14
composer.json
composer.json
+7
-8
composer.lock
composer.lock
+188
-824
app.php
config/app.php
+40
-45
BrowserKitTestCase.php
tests/BrowserKitTestCase.php
+2
-2
PageTest.php
tests/Feature/Api/V1/PageTest.php
+34
-47
ManageBlogsTest.php
tests/Feature/Backend/ManageBlogsTest.php
+11
-10
ManageSettingsTest.php
tests/Feature/Backend/ManageSettingsTest.php
+3
-3
TestCase.php
tests/TestCase.php
+2
-2
No files found.
access.log
View file @
f3dadd96
...
...
@@ -145,3 +145,7 @@
127.0.0.1 - - [07/Mar/2019:18:15:03 +0530] "GET /login HTTP/1.1" 200 12126 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36"
127.0.0.1 - - [07/Mar/2019:18:15:07 +0530] "POST /login HTTP/1.1" 302 1459 "http://laraveladminpanel.local/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36"
127.0.0.1 - - [07/Mar/2019:18:15:07 +0530] "GET /admin/dashboard HTTP/1.1" 200 21420 "http://laraveladminpanel.local/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36"
127.0.0.1 - - [07/Mar/2019:19:47:51 +0530] "GET /admin/dashboard HTTP/1.1" 302 1697 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36"
127.0.0.1 - - [07/Mar/2019:19:47:53 +0530] "GET /login HTTP/1.1" 200 2671 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36"
127.0.0.1 - - [07/Mar/2019:19:48:00 +0530] "POST /login HTTP/1.1" 302 1470 "http://laraveladminpanel.local/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36"
127.0.0.1 - - [07/Mar/2019:19:48:00 +0530] "GET /admin/dashboard HTTP/1.1" 200 3839 "http://laraveladminpanel.local/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36"
app/Providers/AppServiceProvider.php
View file @
f3dadd96
...
...
@@ -58,20 +58,6 @@ class AppServiceProvider extends ServiceProvider
* Sets third party service providers that are only needed on local/testing environments
*/
if
(
$this
->
app
->
environment
()
!=
'production'
)
{
/**
* Loader for registering facades.
*/
$loader
=
\Illuminate\Foundation\AliasLoader
::
getInstance
();
/*
* Load third party local providers
*/
$this
->
app
->
register
(
\Barryvdh\Debugbar\ServiceProvider
::
class
);
/*
* Load third party local aliases
*/
$loader
->
alias
(
'Debugbar'
,
\Barryvdh\Debugbar\Facade
::
class
);
}
}
}
composer.json
View file @
f3dadd96
...
...
@@ -19,26 +19,25 @@
"
doctrine/dbal
"
:
"
^2.9
"
,
"
fideloper/proxy
"
:
"
^4.0
"
,
"
hieu-le/active
"
:
"
^3.5
"
,
"
laravel/framework
"
:
"
5.
7
.*
"
,
"
laravel/framework
"
:
"
5.
8
.*
"
,
"
laravel/socialite
"
:
"
^3.0
"
,
"
laravel/tinker
"
:
"
~1.0
"
,
"
laravelcollective/html
"
:
"
^5.4.0
"
,
"
spatie/laravel-cors
"
:
"
^1.2
"
,
"
tymon/jwt-auth
"
:
"
1.0.0-rc.3
"
,
"
tymon/jwt-auth
"
:
"
2.0.x-dev
"
,
"
unisharp/laravel-filemanager
"
:
"
~1.8
"
,
"
yajra/laravel-datatables-oracle
"
:
"
~
8
.0
"
"
yajra/laravel-datatables-oracle
"
:
"
~
9
.0
"
},
"require-dev"
:
{
"
laravel/telescope
"
:
"
^1.0
"
,
"
barryvdh/laravel-debugbar
"
:
"
^3.0
"
,
"
laravel/telescope
"
:
"
^2.0
"
,
"
bvipul/generator
"
:
"
^5.6
"
,
"
codedungeon/phpunit-result-printer
"
:
"
^0.19.10
"
,
"
filp/whoops
"
:
"
~2.0
"
,
"
fzaninotto/faker
"
:
"
~1.4
"
,
"
laravel/browser-kit-testing
"
:
"
^4.0.0
"
,
"
mockery/mockery
"
:
"
0.9.*
"
,
"
nunomaduro/larastan
"
:
"
^0.3.8
"
,
"
mockery/mockery
"
:
"
1.2.2
"
,
"
nunomaduro/larastan
"
:
"
^0.3.15
"
,
"
phpunit/phpunit
"
:
"
~7.0
"
,
"
laravel/browser-kit-testing
"
:
"
^4.0.0
"
,
"
xethron/migrations-generator
"
:
"
2.0.2
"
},
"autoload"
:
{
...
...
composer.lock
View file @
f3dadd96
This diff is collapsed.
Click to expand it.
config/app.php
View file @
f3dadd96
<?php
return
[
/*
|--------------------------------------------------------------------------
| Application Name
...
...
@@ -147,7 +146,6 @@ return [
*/
'providers'
=>
[
/*
* Laravel Framework Service Providers...
*/
...
...
@@ -193,7 +191,7 @@ return [
App\Providers\AccessServiceProvider
::
class
,
App\Providers\AppServiceProvider
::
class
,
App\Providers\AuthServiceProvider
::
class
,
App\Providers\BladeServiceProvider
::
class
,
//
App\Providers\BladeServiceProvider::class,
//App\Providers\BroadcastServiceProvider::class,
App\Providers\ComposerServiceProvider
::
class
,
App\Providers\EventServiceProvider
::
class
,
...
...
@@ -216,54 +214,51 @@ return [
*/
'aliases'
=>
[
'App'
=>
Illuminate\Support\Facades\App
::
class
,
'Artisan'
=>
Illuminate\Support\Facades\Artisan
::
class
,
'Auth'
=>
Illuminate\Support\Facades\Auth
::
class
,
'Blade'
=>
Illuminate\Support\Facades\Blade
::
class
,
'Broadcast'
=>
Illuminate\Support\Facades\Broadcast
::
class
,
'Bus'
=>
Illuminate\Support\Facades\Bus
::
class
,
'Cache'
=>
Illuminate\Support\Facades\Cache
::
class
,
'Config'
=>
Illuminate\Support\Facades\Config
::
class
,
'Cookie'
=>
Illuminate\Support\Facades\Cookie
::
class
,
'Crypt'
=>
Illuminate\Support\Facades\Crypt
::
class
,
'DB'
=>
Illuminate\Support\Facades\DB
::
class
,
'Eloquent'
=>
Illuminate\Database\Eloquent\Model
::
class
,
'Event'
=>
Illuminate\Support\Facades\Event
::
class
,
'File'
=>
Illuminate\Support\Facades\File
::
class
,
'Gate'
=>
Illuminate\Support\Facades\Gate
::
class
,
'Hash'
=>
Illuminate\Support\Facades\Hash
::
class
,
'Lang'
=>
Illuminate\Support\Facades\Lang
::
class
,
'Log'
=>
Illuminate\Support\Facades\Log
::
class
,
'Mail'
=>
Illuminate\Support\Facades\Mail
::
class
,
'App'
=>
Illuminate\Support\Facades\App
::
class
,
'Artisan'
=>
Illuminate\Support\Facades\Artisan
::
class
,
'Auth'
=>
Illuminate\Support\Facades\Auth
::
class
,
'Blade'
=>
Illuminate\Support\Facades\Blade
::
class
,
'Broadcast'
=>
Illuminate\Support\Facades\Broadcast
::
class
,
'Bus'
=>
Illuminate\Support\Facades\Bus
::
class
,
'Cache'
=>
Illuminate\Support\Facades\Cache
::
class
,
'Config'
=>
Illuminate\Support\Facades\Config
::
class
,
'Cookie'
=>
Illuminate\Support\Facades\Cookie
::
class
,
'Crypt'
=>
Illuminate\Support\Facades\Crypt
::
class
,
'DB'
=>
Illuminate\Support\Facades\DB
::
class
,
'Eloquent'
=>
Illuminate\Database\Eloquent\Model
::
class
,
'Event'
=>
Illuminate\Support\Facades\Event
::
class
,
'File'
=>
Illuminate\Support\Facades\File
::
class
,
'Gate'
=>
Illuminate\Support\Facades\Gate
::
class
,
'Hash'
=>
Illuminate\Support\Facades\Hash
::
class
,
'Lang'
=>
Illuminate\Support\Facades\Lang
::
class
,
'Log'
=>
Illuminate\Support\Facades\Log
::
class
,
'Mail'
=>
Illuminate\Support\Facades\Mail
::
class
,
'Notification'
=>
Illuminate\Support\Facades\Notification
::
class
,
'Password'
=>
Illuminate\Support\Facades\Password
::
class
,
'Queue'
=>
Illuminate\Support\Facades\Queue
::
class
,
'Redirect'
=>
Illuminate\Support\Facades\Redirect
::
class
,
'Redis'
=>
Illuminate\Support\Facades\Redis
::
class
,
'Request'
=>
Illuminate\Support\Facades\Request
::
class
,
'Response'
=>
Illuminate\Support\Facades\Response
::
class
,
'Route'
=>
Illuminate\Support\Facades\Route
::
class
,
'Schema'
=>
Illuminate\Support\Facades\Schema
::
class
,
'Session'
=>
Illuminate\Support\Facades\Session
::
class
,
'Storage'
=>
Illuminate\Support\Facades\Storage
::
class
,
'URL'
=>
Illuminate\Support\Facades\URL
::
class
,
'Validator'
=>
Illuminate\Support\Facades\Validator
::
class
,
'View'
=>
Illuminate\Support\Facades\View
::
class
,
'Password'
=>
Illuminate\Support\Facades\Password
::
class
,
'Queue'
=>
Illuminate\Support\Facades\Queue
::
class
,
'Redirect'
=>
Illuminate\Support\Facades\Redirect
::
class
,
'Redis'
=>
Illuminate\Support\Facades\Redis
::
class
,
'Request'
=>
Illuminate\Support\Facades\Request
::
class
,
'Response'
=>
Illuminate\Support\Facades\Response
::
class
,
'Route'
=>
Illuminate\Support\Facades\Route
::
class
,
'Schema'
=>
Illuminate\Support\Facades\Schema
::
class
,
'Session'
=>
Illuminate\Support\Facades\Session
::
class
,
'Storage'
=>
Illuminate\Support\Facades\Storage
::
class
,
'URL'
=>
Illuminate\Support\Facades\URL
::
class
,
'Validator'
=>
Illuminate\Support\Facades\Validator
::
class
,
'View'
=>
Illuminate\Support\Facades\View
::
class
,
/*
* Third Party Aliases
*/
'Active'
=>
HieuLe\Active\Facades\Active
::
class
,
'Active'
=>
HieuLe\Active\Facades\Active
::
class
,
'Breadcrumbs'
=>
DaveJamesMiller\Breadcrumbs\Facade
::
class
,
'Captcha'
=>
Arcanedev\NoCaptcha\Facades\NoCaptcha
::
class
,
'Form'
=>
Collective\Html\FormFacade
::
class
,
'Gravatar'
=>
Creativeorange\Gravatar\Facades\Gravatar
::
class
,
'Html'
=>
Collective\Html\HtmlFacade
::
class
,
'Socialite'
=>
Laravel\Socialite\Facades\Socialite
::
class
,
'JWTAuth'
=>
Tymon\JWTAuth\Facades\JWTAuth
::
class
,
'Captcha'
=>
Arcanedev\NoCaptcha\Facades\NoCaptcha
::
class
,
'Form'
=>
Collective\Html\FormFacade
::
class
,
'Gravatar'
=>
Creativeorange\Gravatar\Facades\Gravatar
::
class
,
'Html'
=>
Collective\Html\HtmlFacade
::
class
,
'Socialite'
=>
Laravel\Socialite\Facades\Socialite
::
class
,
'JWTAuth'
=>
Tymon\JWTAuth\Facades\JWTAuth
::
class
,
//'Datatables' => Yajra\DataTables\Facades\DataTables::class
],
];
tests/BrowserKitTestCase.php
View file @
f3dadd96
...
...
@@ -50,7 +50,7 @@ abstract class BrowserKitTestCase extends BaseTestCase
*/
protected
$userRole
;
public
function
setUp
()
public
function
setUp
()
:
void
{
parent
::
setUp
();
...
...
@@ -76,7 +76,7 @@ abstract class BrowserKitTestCase extends BaseTestCase
$this
->
userRole
=
Role
::
find
(
3
);
}
public
function
tearDown
()
public
function
tearDown
()
:
void
{
$this
->
beforeApplicationDestroyed
(
function
()
{
DB
::
disconnect
();
...
...
tests/Feature/Api/V1/PageTest.php
View file @
f3dadd96
...
...
@@ -13,19 +13,17 @@ class PageTest extends TestCase
public
$headers
=
''
;
public
$user
=
''
;
public
function
setUp
()
public
function
setUp
()
:
void
{
parent
::
setUp
();
$this
->
user
=
User
::
find
(
1
);
$this
->
token
=
JWTAuth
::
fromUser
(
$this
->
user
);
$this
->
headers
=
[
'Authorization'
=>
'Bearer '
.
$this
->
token
];
$this
->
headers
=
[
'Authorization'
=>
'Bearer '
.
$this
->
token
];
}
/**
* A basic test example.
*
* @return void
*/
public
function
testExample
()
{
...
...
@@ -34,8 +32,6 @@ class PageTest extends TestCase
/**
* A basic test to get response form pages api.
*
* @return void
*/
/** @test */
...
...
@@ -46,7 +42,7 @@ class PageTest extends TestCase
$response
->
assertStatus
(
200
)
->
assertJsonStructure
([
'data'
=>
[
'data'
=>
[
[
'id'
,
'title'
,
...
...
@@ -63,8 +59,6 @@ class PageTest extends TestCase
/**
* A basic test to get response form pages api.
*
* @return void
*/
/** @test */
...
...
@@ -72,17 +66,17 @@ class PageTest extends TestCase
{
$page
=
create
(
Page
::
class
);
$payload
=
[];
$response
=
$this
->
json
(
'GET'
,
'/api/v1/pages/'
.
$page
->
id
,
$payload
,
$this
->
headers
);
$response
=
$this
->
json
(
'GET'
,
'/api/v1/pages/'
.
$page
->
id
,
$payload
,
$this
->
headers
);
$response
->
assertStatus
(
200
)
->
assertJson
([
'data'
=>
[
'id'
=>
$page
->
id
,
'title'
=>
$page
->
title
,
'status_label'
=>
$page
->
status_label
,
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'created_by'
=>
$page
->
created_by
,
],
'data'
=>
[
'id'
=>
$page
->
id
,
'title'
=>
$page
->
title
,
'status_label'
=>
$page
->
status_label
,
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'created_by'
=>
$page
->
created_by
,
],
]);
}
...
...
@@ -90,9 +84,6 @@ class PageTest extends TestCase
* Author: Indra Shastri
* Date:03-03-2018
* A basic test to update a page from api.
*
*
* @return void
*/
/** @test */
...
...
@@ -100,34 +91,32 @@ class PageTest extends TestCase
{
$page
=
make
(
Page
::
class
);
$payload
=
[
'title'
=>
$page
->
title
,
'description'
=>
$page
->
description
,
'title'
=>
$page
->
title
,
'description'
=>
$page
->
description
,
'cannonical_link'
=>
$page
->
cannonical_link
,
'seo_title'
=>
'some tittle'
,
'seo_keyword'
=>
'some keywords'
,
'seo_title'
=>
'some tittle'
,
'seo_keyword'
=>
'some keywords'
,
'seo_description'
=>
'<p> </p>↵<h1>SEO Description</h1>↵<p>some seco desctription</p>↵<p>askdsaj;ldsjfd</p>'
,
'status'
=>
'1'
,
'status'
=>
'1'
,
];
$response
=
''
;
$response
=
$this
->
json
(
'PUT'
,
'/api/v1/pages/1'
,
$payload
,
$this
->
headers
);
$response
->
assertStatus
(
200
);
$response
->
assertJson
([
'data'
=>
[
'title'
=>
$page
->
title
,
'status_label'
=>
$page
->
status_label
,
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'created_by'
=>
''
.
$this
->
user
->
id
,
],
]);
'data'
=>
[
'title'
=>
$page
->
title
,
'status_label'
=>
$page
->
status_label
,
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'created_by'
=>
''
.
$this
->
user
->
id
,
],
]);
}
/**
* Author: Indra Shastri
* Date:03-03-2018
* A basic test to create a page from api.
*
* @return void
*/
/** @test */
...
...
@@ -135,24 +124,24 @@ class PageTest extends TestCase
{
$page
=
make
(
Page
::
class
);
$payload
=
[
'title'
=>
$page
->
title
,
'description'
=>
$page
->
description
,
'title'
=>
$page
->
title
,
'description'
=>
$page
->
description
,
'cannonical_link'
=>
$page
->
cannonical_link
,
'seo_title'
=>
'some tittle'
,
'seo_keyword'
=>
'some keywords'
,
'seo_title'
=>
'some tittle'
,
'seo_keyword'
=>
'some keywords'
,
'seo_description'
=>
'<p> </p>↵<h1>SEO Description</h1>↵<p>some seco desctription</p>↵<p>askdsaj;ldsjfd</p>'
,
'status'
=>
'1'
,
'status'
=>
'1'
,
];
$response
=
''
;
$response
=
$this
->
json
(
'POST'
,
'/api/v1/pages'
,
$payload
,
$this
->
headers
);
$response
->
assertStatus
(
201
);
$response
->
assertJson
([
'data'
=>
[
'title'
=>
$page
->
title
,
'title'
=>
$page
->
title
,
'status_label'
=>
$page
->
status_label
,
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'created_by'
=>
$this
->
user
->
first_name
,
'created_at'
=>
(
\Carbon\Carbon
::
now
())
->
toDateString
(),
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'created_by'
=>
$this
->
user
->
first_name
,
'created_at'
=>
(
\Carbon\Carbon
::
now
())
->
toDateString
(),
],
]);
}
...
...
@@ -161,8 +150,6 @@ class PageTest extends TestCase
* Author: Indra Shastri
* Date:03-03-2018
* A basic test to create a page from api.
*
* @return void
*/
/** @test */
...
...
@@ -170,10 +157,10 @@ class PageTest extends TestCase
{
$page
=
create
(
Page
::
class
);
$payload
=
[];
$response
=
$this
->
json
(
'DELETE'
,
'/api/v1/pages/'
.
$page
->
id
,
$payload
,
$this
->
headers
);
$response
=
$this
->
json
(
'DELETE'
,
'/api/v1/pages/'
.
$page
->
id
,
$payload
,
$this
->
headers
);
$response
->
assertStatus
(
200
)
->
assertJson
([
'message'
=>
'The Page was successfully deleted.'
,
'message'
=>
'The Page was successfully deleted.'
,
]);
}
}
tests/Feature/Backend/ManageBlogsTest.php
View file @
f3dadd96
...
...
@@ -16,7 +16,7 @@ class ManageBlogsTest extends TestCase
protected
$categories
;
protected
$tags
;
public
function
setUp
()
public
function
setUp
()
:
void
{
parent
::
setUp
();
...
...
@@ -47,8 +47,8 @@ class ManageBlogsTest extends TestCase
{
$blog
=
make
(
Blog
::
class
,
[
'featured_image'
=>
UploadedFile
::
fake
()
->
image
(
'logo.jpg'
),
'categories'
=>
$this
->
categories
,
'tags'
=>
$this
->
tags
,
'categories'
=>
$this
->
categories
,
'tags'
=>
$this
->
tags
,
]);
$this
->
post
(
route
(
'admin.blogs.store'
),
$blog
->
toArray
());
...
...
@@ -134,15 +134,15 @@ class ManageBlogsTest extends TestCase
{
$blog
=
make
(
Blog
::
class
,
[
'featured_image'
=>
UploadedFile
::
fake
()
->
image
(
'logo.jpg'
),
'categories'
=>
$this
->
categories
,
'tags'
=>
$this
->
tags
,
'categories'
=>
$this
->
categories
,
'tags'
=>
$this
->
tags
,
]);
$this
->
post
(
route
(
'admin.blogs.store'
),
$blog
->
toArray
());
$stored_blog
=
Blog
::
find
(
2
);
Storage
::
disk
(
'public'
)
->
assertExists
(
'img/blog/'
.
$stored_blog
->
featured_image
);
Storage
::
disk
(
'public'
)
->
assertExists
(
'img/blog/'
.
$stored_blog
->
featured_image
);
}
/** @test */
...
...
@@ -201,9 +201,9 @@ class ManageBlogsTest extends TestCase
{
$blog
=
make
(
Blog
::
class
,
[
'featured_image'
=>
UploadedFile
::
fake
()
->
image
(
'logo.jpg'
),
'name'
=>
'Changed Name'
,
'categories'
=>
$this
->
categories
,
'tags'
=>
$this
->
tags
,
'name'
=>
'Changed Name'
,
'categories'
=>
$this
->
categories
,
'tags'
=>
$this
->
tags
,
]);
$this
->
patch
(
route
(
'admin.blogs.update'
,
$this
->
blog
),
$blog
->
toArray
());
...
...
@@ -227,7 +227,8 @@ class ManageBlogsTest extends TestCase
$catCategory
=
create
(
Blog
::
class
,
[
'name'
=>
'Cat'
]);
$dogCategory
=
create
(
Blog
::
class
,
[
'name'
=>
'Dog'
]);
$this
->
patch
(
route
(
'admin.blogs.update'
,
$dogCategory
),
$this
->
patch
(
route
(
'admin.blogs.update'
,
$dogCategory
),
[
'name'
=>
'Cat'
]
)
->
assertSessionHasErrors
(
'name'
);
}
...
...
tests/Feature/Backend/ManageSettingsTest.php
View file @
f3dadd96
...
...
@@ -11,7 +11,7 @@ class ManageSettingsTest extends TestCase
{
protected
$setting
;
public
function
setUp
()
public
function
setUp
()
:
void
{
parent
::
setUp
();
...
...
@@ -38,7 +38,7 @@ class ManageSettingsTest extends TestCase
'logo'
=>
UploadedFile
::
fake
()
->
image
(
'logo.jpg'
,
226
,
48
),
]);
Storage
::
disk
(
'public'
)
->
assertExists
(
'img/logo/'
.
$this
->
setting
->
logo
);
Storage
::
disk
(
'public'
)
->
assertExists
(
'img/logo/'
.
$this
->
setting
->
logo
);
}
/** @test */
...
...
@@ -59,7 +59,7 @@ class ManageSettingsTest extends TestCase
'favicon'
=>
UploadedFile
::
fake
()
->
image
(
'favicon.jpg'
,
16
,
16
),
]);
Storage
::
disk
(
'public'
)
->
assertExists
(
'img/favicon/'
.
$this
->
setting
->
favicon
);
Storage
::
disk
(
'public'
)
->
assertExists
(
'img/favicon/'
.
$this
->
setting
->
favicon
);
}
/** @test */
...
...
tests/TestCase.php
View file @
f3dadd96
...
...
@@ -54,7 +54,7 @@ abstract class TestCase extends BaseTestCase
/**
* Set up tests.
*/
public
function
setUp
()
public
function
setUp
()
:
void
{
parent
::
setUp
();
...
...
@@ -80,7 +80,7 @@ abstract class TestCase extends BaseTestCase
$this
->
userRole
=
Role
::
find
(
3
);
}
public
function
tearDown
()
public
function
tearDown
()
:
void
{
$this
->
beforeApplicationDestroyed
(
function
()
{
DB
::
disconnect
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment