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
372d94ba
Commit
372d94ba
authored
Jan 02, 2018
by
Viral Solani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unit test cases for Role
parent
cc559d77
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
8 deletions
+39
-8
phpunit.xml
phpunit.xml
+0
-8
ManageRolesTest.php
tests/Feature/Backend/ManageRolesTest.php
+14
-0
RoleTest.php
tests/Unit/Models/RoleTest.php
+25
-0
No files found.
phpunit.xml
View file @
372d94ba
...
...
@@ -31,13 +31,5 @@
<env
name=
"SESSION_DRIVER"
value=
"array"
/>
<env
name=
"QUEUE_DRIVER"
value=
"sync"
/>
<env
name=
"SCOUT_DRIVER"
value=
"null"
/>
</php>
<!-- <testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">
./tests
</directory>
</testsuite>
</testsuites> -->
</phpunit>
tests/Feature/Backend/ManageRolesTest.php
0 → 100644
View file @
372d94ba
<?php
namespace
Tests\Feature\Backend
;
use
App\Models\Access\Permission\Permission
;
use
App\Models\Access\Role\Role
;
use
Illuminate\Support\Facades\Event
;
use
Illuminate\Support\Facades\Notification
;
use
Tests\TestCase
;
class
ManageRolesTest
extends
TestCase
{
}
tests/Unit/Models/RoleTest.php
0 → 100644
View file @
372d94ba
<?php
namespace
Tests\Unit\Models
;
use
Tests\TestCase
;
class
RoleTest
extends
TestCase
{
/** @test */
public
function
a_role_has_users
()
{
$this
->
assertInstanceOf
(
'Illuminate\Database\Eloquent\Collection'
,
$this
->
adminRole
->
users
);
}
/** @test */
public
function
a_role_has_permissions
()
{
$this
->
assertInstanceOf
(
'Illuminate\Database\Eloquent\Collection'
,
$this
->
adminRole
->
permissions
);
}
}
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