OwnershipPolicyTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 8
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAccessPolicy() 0 6 1
1
<?php
2
3
namespace Foundation\Tests;
4
5
use Foundation\Abstracts\Tests\TestCase;
6
use Modules\User\Entities\User;
7
8
class OwnershipPolicyTest extends TestCase
9
{
10
    public function testAccessPolicy()
11
    {
12
        $user = $this->actAsRandomUser();
13
        $user2 = User::fromFactory()->create();
14
        $this->assertTrue($user->can('access', get_authenticated_user()));
15
        $this->assertFalse($user2->can('access', get_authenticated_user()));
16
    }
17
}
18