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
ab42a44d
Commit
ab42a44d
authored
Mar 07, 2019
by
Viral Solani
Committed by
StyleCI Bot
Mar 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply fixes from StyleCI
parent
b788def5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
73 deletions
+73
-73
app.php
config/app.php
+39
-39
PageTest.php
tests/Feature/Api/V1/PageTest.php
+24
-24
ManageBlogsTest.php
tests/Feature/Backend/ManageBlogsTest.php
+8
-8
ManageSettingsTest.php
tests/Feature/Backend/ManageSettingsTest.php
+2
-2
No files found.
config/app.php
View file @
ab42a44d
...
@@ -214,51 +214,51 @@ return [
...
@@ -214,51 +214,51 @@ return [
*/
*/
'aliases'
=>
[
'aliases'
=>
[
'App'
=>
Illuminate\Support\Facades\App
::
class
,
'App'
=>
Illuminate\Support\Facades\App
::
class
,
'Artisan'
=>
Illuminate\Support\Facades\Artisan
::
class
,
'Artisan'
=>
Illuminate\Support\Facades\Artisan
::
class
,
'Auth'
=>
Illuminate\Support\Facades\Auth
::
class
,
'Auth'
=>
Illuminate\Support\Facades\Auth
::
class
,
'Blade'
=>
Illuminate\Support\Facades\Blade
::
class
,
'Blade'
=>
Illuminate\Support\Facades\Blade
::
class
,
'Broadcast'
=>
Illuminate\Support\Facades\Broadcast
::
class
,
'Broadcast'
=>
Illuminate\Support\Facades\Broadcast
::
class
,
'Bus'
=>
Illuminate\Support\Facades\Bus
::
class
,
'Bus'
=>
Illuminate\Support\Facades\Bus
::
class
,
'Cache'
=>
Illuminate\Support\Facades\Cache
::
class
,
'Cache'
=>
Illuminate\Support\Facades\Cache
::
class
,
'Config'
=>
Illuminate\Support\Facades\Config
::
class
,
'Config'
=>
Illuminate\Support\Facades\Config
::
class
,
'Cookie'
=>
Illuminate\Support\Facades\Cookie
::
class
,
'Cookie'
=>
Illuminate\Support\Facades\Cookie
::
class
,
'Crypt'
=>
Illuminate\Support\Facades\Crypt
::
class
,
'Crypt'
=>
Illuminate\Support\Facades\Crypt
::
class
,
'DB'
=>
Illuminate\Support\Facades\DB
::
class
,
'DB'
=>
Illuminate\Support\Facades\DB
::
class
,
'Eloquent'
=>
Illuminate\Database\Eloquent\Model
::
class
,
'Eloquent'
=>
Illuminate\Database\Eloquent\Model
::
class
,
'Event'
=>
Illuminate\Support\Facades\Event
::
class
,
'Event'
=>
Illuminate\Support\Facades\Event
::
class
,
'File'
=>
Illuminate\Support\Facades\File
::
class
,
'File'
=>
Illuminate\Support\Facades\File
::
class
,
'Gate'
=>
Illuminate\Support\Facades\Gate
::
class
,
'Gate'
=>
Illuminate\Support\Facades\Gate
::
class
,
'Hash'
=>
Illuminate\Support\Facades\Hash
::
class
,
'Hash'
=>
Illuminate\Support\Facades\Hash
::
class
,
'Lang'
=>
Illuminate\Support\Facades\Lang
::
class
,
'Lang'
=>
Illuminate\Support\Facades\Lang
::
class
,
'Log'
=>
Illuminate\Support\Facades\Log
::
class
,
'Log'
=>
Illuminate\Support\Facades\Log
::
class
,
'Mail'
=>
Illuminate\Support\Facades\Mail
::
class
,
'Mail'
=>
Illuminate\Support\Facades\Mail
::
class
,
'Notification'
=>
Illuminate\Support\Facades\Notification
::
class
,
'Notification'
=>
Illuminate\Support\Facades\Notification
::
class
,
'Password'
=>
Illuminate\Support\Facades\Password
::
class
,
'Password'
=>
Illuminate\Support\Facades\Password
::
class
,
'Queue'
=>
Illuminate\Support\Facades\Queue
::
class
,
'Queue'
=>
Illuminate\Support\Facades\Queue
::
class
,
'Redirect'
=>
Illuminate\Support\Facades\Redirect
::
class
,
'Redirect'
=>
Illuminate\Support\Facades\Redirect
::
class
,
'Redis'
=>
Illuminate\Support\Facades\Redis
::
class
,
'Redis'
=>
Illuminate\Support\Facades\Redis
::
class
,
'Request'
=>
Illuminate\Support\Facades\Request
::
class
,
'Request'
=>
Illuminate\Support\Facades\Request
::
class
,
'Response'
=>
Illuminate\Support\Facades\Response
::
class
,
'Response'
=>
Illuminate\Support\Facades\Response
::
class
,
'Route'
=>
Illuminate\Support\Facades\Route
::
class
,
'Route'
=>
Illuminate\Support\Facades\Route
::
class
,
'Schema'
=>
Illuminate\Support\Facades\Schema
::
class
,
'Schema'
=>
Illuminate\Support\Facades\Schema
::
class
,
'Session'
=>
Illuminate\Support\Facades\Session
::
class
,
'Session'
=>
Illuminate\Support\Facades\Session
::
class
,
'Storage'
=>
Illuminate\Support\Facades\Storage
::
class
,
'Storage'
=>
Illuminate\Support\Facades\Storage
::
class
,
'URL'
=>
Illuminate\Support\Facades\URL
::
class
,
'URL'
=>
Illuminate\Support\Facades\URL
::
class
,
'Validator'
=>
Illuminate\Support\Facades\Validator
::
class
,
'Validator'
=>
Illuminate\Support\Facades\Validator
::
class
,
'View'
=>
Illuminate\Support\Facades\View
::
class
,
'View'
=>
Illuminate\Support\Facades\View
::
class
,
/*
/*
* Third Party Aliases
* Third Party Aliases
*/
*/
'Active'
=>
HieuLe\Active\Facades\Active
::
class
,
'Active'
=>
HieuLe\Active\Facades\Active
::
class
,
'Breadcrumbs'
=>
DaveJamesMiller\Breadcrumbs\Facade
::
class
,
'Breadcrumbs'
=>
DaveJamesMiller\Breadcrumbs\Facade
::
class
,
'Captcha'
=>
Arcanedev\NoCaptcha\Facades\NoCaptcha
::
class
,
'Captcha'
=>
Arcanedev\NoCaptcha\Facades\NoCaptcha
::
class
,
'Form'
=>
Collective\Html\FormFacade
::
class
,
'Form'
=>
Collective\Html\FormFacade
::
class
,
'Gravatar'
=>
Creativeorange\Gravatar\Facades\Gravatar
::
class
,
'Gravatar'
=>
Creativeorange\Gravatar\Facades\Gravatar
::
class
,
'Html'
=>
Collective\Html\HtmlFacade
::
class
,
'Html'
=>
Collective\Html\HtmlFacade
::
class
,
'Socialite'
=>
Laravel\Socialite\Facades\Socialite
::
class
,
'Socialite'
=>
Laravel\Socialite\Facades\Socialite
::
class
,
'JWTAuth'
=>
Tymon\JWTAuth\Facades\JWTAuth
::
class
,
'JWTAuth'
=>
Tymon\JWTAuth\Facades\JWTAuth
::
class
,
//'Datatables' => Yajra\DataTables\Facades\DataTables::class
//'Datatables' => Yajra\DataTables\Facades\DataTables::class
],
],
];
];
tests/Feature/Api/V1/PageTest.php
View file @
ab42a44d
...
@@ -19,7 +19,7 @@ class PageTest extends TestCase
...
@@ -19,7 +19,7 @@ class PageTest extends TestCase
$this
->
user
=
User
::
find
(
1
);
$this
->
user
=
User
::
find
(
1
);
$this
->
token
=
JWTAuth
::
fromUser
(
$this
->
user
);
$this
->
token
=
JWTAuth
::
fromUser
(
$this
->
user
);
$this
->
headers
=
[
'Authorization'
=>
'Bearer '
.
$this
->
token
];
$this
->
headers
=
[
'Authorization'
=>
'Bearer '
.
$this
->
token
];
}
}
/**
/**
...
@@ -66,16 +66,16 @@ class PageTest extends TestCase
...
@@ -66,16 +66,16 @@ class PageTest extends TestCase
{
{
$page
=
create
(
Page
::
class
);
$page
=
create
(
Page
::
class
);
$payload
=
[];
$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
$response
->
assertStatus
(
200
)
->
assertStatus
(
200
)
->
assertJson
([
->
assertJson
([
'data'
=>
[
'data'
=>
[
'id'
=>
$page
->
id
,
'id'
=>
$page
->
id
,
'title'
=>
$page
->
title
,
'title'
=>
$page
->
title
,
'status_label'
=>
$page
->
status_label
,
'status_label'
=>
$page
->
status_label
,
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'created_by'
=>
$page
->
created_by
,
'created_by'
=>
$page
->
created_by
,
],
],
]);
]);
}
}
...
@@ -91,13 +91,13 @@ class PageTest extends TestCase
...
@@ -91,13 +91,13 @@ class PageTest extends TestCase
{
{
$page
=
make
(
Page
::
class
);
$page
=
make
(
Page
::
class
);
$payload
=
[
$payload
=
[
'title'
=>
$page
->
title
,
'title'
=>
$page
->
title
,
'description'
=>
$page
->
description
,
'description'
=>
$page
->
description
,
'cannonical_link'
=>
$page
->
cannonical_link
,
'cannonical_link'
=>
$page
->
cannonical_link
,
'seo_title'
=>
'some tittle'
,
'seo_title'
=>
'some tittle'
,
'seo_keyword'
=>
'some keywords'
,
'seo_keyword'
=>
'some keywords'
,
'seo_description'
=>
'<p> </p>↵<h1>SEO Description</h1>↵<p>some seco desctription</p>↵<p>askdsaj;ldsjfd</p>'
,
'seo_description'
=>
'<p> </p>↵<h1>SEO Description</h1>↵<p>some seco desctription</p>↵<p>askdsaj;ldsjfd</p>'
,
'status'
=>
'1'
,
'status'
=>
'1'
,
];
];
$response
=
''
;
$response
=
''
;
$response
=
$this
->
json
(
'PUT'
,
'/api/v1/pages/1'
,
$payload
,
$this
->
headers
);
$response
=
$this
->
json
(
'PUT'
,
'/api/v1/pages/1'
,
$payload
,
$this
->
headers
);
...
@@ -105,10 +105,10 @@ class PageTest extends TestCase
...
@@ -105,10 +105,10 @@ class PageTest extends TestCase
$response
->
assertStatus
(
200
);
$response
->
assertStatus
(
200
);
$response
->
assertJson
([
$response
->
assertJson
([
'data'
=>
[
'data'
=>
[
'title'
=>
$page
->
title
,
'title'
=>
$page
->
title
,
'status_label'
=>
$page
->
status_label
,
'status_label'
=>
$page
->
status_label
,
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'created_by'
=>
''
.
$this
->
user
->
id
,
'created_by'
=>
''
.
$this
->
user
->
id
,
],
],
]);
]);
}
}
...
@@ -124,24 +124,24 @@ class PageTest extends TestCase
...
@@ -124,24 +124,24 @@ class PageTest extends TestCase
{
{
$page
=
make
(
Page
::
class
);
$page
=
make
(
Page
::
class
);
$payload
=
[
$payload
=
[
'title'
=>
$page
->
title
,
'title'
=>
$page
->
title
,
'description'
=>
$page
->
description
,
'description'
=>
$page
->
description
,
'cannonical_link'
=>
$page
->
cannonical_link
,
'cannonical_link'
=>
$page
->
cannonical_link
,
'seo_title'
=>
'some tittle'
,
'seo_title'
=>
'some tittle'
,
'seo_keyword'
=>
'some keywords'
,
'seo_keyword'
=>
'some keywords'
,
'seo_description'
=>
'<p> </p>↵<h1>SEO Description</h1>↵<p>some seco desctription</p>↵<p>askdsaj;ldsjfd</p>'
,
'seo_description'
=>
'<p> </p>↵<h1>SEO Description</h1>↵<p>some seco desctription</p>↵<p>askdsaj;ldsjfd</p>'
,
'status'
=>
'1'
,
'status'
=>
'1'
,
];
];
$response
=
''
;
$response
=
''
;
$response
=
$this
->
json
(
'POST'
,
'/api/v1/pages'
,
$payload
,
$this
->
headers
);
$response
=
$this
->
json
(
'POST'
,
'/api/v1/pages'
,
$payload
,
$this
->
headers
);
$response
->
assertStatus
(
201
);
$response
->
assertStatus
(
201
);
$response
->
assertJson
([
$response
->
assertJson
([
'data'
=>
[
'data'
=>
[
'title'
=>
$page
->
title
,
'title'
=>
$page
->
title
,
'status_label'
=>
$page
->
status_label
,
'status_label'
=>
$page
->
status_label
,
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'status'
=>
(
$page
->
isActive
())
?
'Active'
:
'InActive'
,
'created_by'
=>
$this
->
user
->
first_name
,
'created_by'
=>
$this
->
user
->
first_name
,
'created_at'
=>
(
\Carbon\Carbon
::
now
())
->
toDateString
(),
'created_at'
=>
(
\Carbon\Carbon
::
now
())
->
toDateString
(),
],
],
]);
]);
}
}
...
@@ -157,7 +157,7 @@ class PageTest extends TestCase
...
@@ -157,7 +157,7 @@ class PageTest extends TestCase
{
{
$page
=
create
(
Page
::
class
);
$page
=
create
(
Page
::
class
);
$payload
=
[];
$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
)
$response
->
assertStatus
(
200
)
->
assertJson
([
->
assertJson
([
'message'
=>
'The Page was successfully deleted.'
,
'message'
=>
'The Page was successfully deleted.'
,
...
...
tests/Feature/Backend/ManageBlogsTest.php
View file @
ab42a44d
...
@@ -47,8 +47,8 @@ class ManageBlogsTest extends TestCase
...
@@ -47,8 +47,8 @@ class ManageBlogsTest extends TestCase
{
{
$blog
=
make
(
Blog
::
class
,
[
$blog
=
make
(
Blog
::
class
,
[
'featured_image'
=>
UploadedFile
::
fake
()
->
image
(
'logo.jpg'
),
'featured_image'
=>
UploadedFile
::
fake
()
->
image
(
'logo.jpg'
),
'categories'
=>
$this
->
categories
,
'categories'
=>
$this
->
categories
,
'tags'
=>
$this
->
tags
,
'tags'
=>
$this
->
tags
,
]);
]);
$this
->
post
(
route
(
'admin.blogs.store'
),
$blog
->
toArray
());
$this
->
post
(
route
(
'admin.blogs.store'
),
$blog
->
toArray
());
...
@@ -134,15 +134,15 @@ class ManageBlogsTest extends TestCase
...
@@ -134,15 +134,15 @@ class ManageBlogsTest extends TestCase
{
{
$blog
=
make
(
Blog
::
class
,
[
$blog
=
make
(
Blog
::
class
,
[
'featured_image'
=>
UploadedFile
::
fake
()
->
image
(
'logo.jpg'
),
'featured_image'
=>
UploadedFile
::
fake
()
->
image
(
'logo.jpg'
),
'categories'
=>
$this
->
categories
,
'categories'
=>
$this
->
categories
,
'tags'
=>
$this
->
tags
,
'tags'
=>
$this
->
tags
,
]);
]);
$this
->
post
(
route
(
'admin.blogs.store'
),
$blog
->
toArray
());
$this
->
post
(
route
(
'admin.blogs.store'
),
$blog
->
toArray
());
$stored_blog
=
Blog
::
find
(
2
);
$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 */
/** @test */
...
@@ -201,9 +201,9 @@ class ManageBlogsTest extends TestCase
...
@@ -201,9 +201,9 @@ class ManageBlogsTest extends TestCase
{
{
$blog
=
make
(
Blog
::
class
,
[
$blog
=
make
(
Blog
::
class
,
[
'featured_image'
=>
UploadedFile
::
fake
()
->
image
(
'logo.jpg'
),
'featured_image'
=>
UploadedFile
::
fake
()
->
image
(
'logo.jpg'
),
'name'
=>
'Changed Name'
,
'name'
=>
'Changed Name'
,
'categories'
=>
$this
->
categories
,
'categories'
=>
$this
->
categories
,
'tags'
=>
$this
->
tags
,
'tags'
=>
$this
->
tags
,
]);
]);
$this
->
patch
(
route
(
'admin.blogs.update'
,
$this
->
blog
),
$blog
->
toArray
());
$this
->
patch
(
route
(
'admin.blogs.update'
,
$this
->
blog
),
$blog
->
toArray
());
...
...
tests/Feature/Backend/ManageSettingsTest.php
View file @
ab42a44d
...
@@ -38,7 +38,7 @@ class ManageSettingsTest extends TestCase
...
@@ -38,7 +38,7 @@ class ManageSettingsTest extends TestCase
'logo'
=>
UploadedFile
::
fake
()
->
image
(
'logo.jpg'
,
226
,
48
),
'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 */
/** @test */
...
@@ -59,7 +59,7 @@ class ManageSettingsTest extends TestCase
...
@@ -59,7 +59,7 @@ class ManageSettingsTest extends TestCase
'favicon'
=>
UploadedFile
::
fake
()
->
image
(
'favicon.jpg'
,
16
,
16
),
'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 */
/** @test */
...
...
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