Property | Type | Description | |
---|---|---|---|
$providers | array | Array of service providers. |
Method | Description | |
---|---|---|
setUp ( ) | ||
testShouldAttachPermissionToRole ( ) | Testing if permission is attached to role. | |
testShouldCreatePermission ( ) | Testing the criation of permissions. | |
testUserShouldHasPermissionsTrait ( ) | Asserting if the User model has traits. |
Method | Description | |
---|---|---|
createAndAttachPermission ( string $permission, |
Create and Attach a Permission to User. | |
createAndAttachPermissionToRole ( string $permission, Artesaos\Defender\Role $role, string $readableName = null ) : array | Create and Attach a Permission to User. | |
createPermission ( string $name, string $readableName = null ) : Artesaos\Defender\Permission | Create a permission and assert to see in database. | |
notSeePermissionAttachedToRoleInDatabase ( Artesaos\Defender\Permission $permission, Artesaos\Defender\Role $role ) | Assert to not see in Database a Permission attached to Role. | |
notSeePermissionAttachedToUserInDatabase ( Artesaos\Defender\Permission $permission, |
Assert to not see in Database a Permission attached to User. | |
seePermissionAttachedToRoleInDatabase ( Artesaos\Defender\Permission $permission, Artesaos\Defender\Role $role ) | Assert to see in Database a Permission attached to Role. | |
seePermissionAttachedToUserInDatabase ( Artesaos\Defender\Permission $permission, |
Assert to see in Database a Permission attached to User. |
protected createAndAttachPermissionToRole ( string $permission, Artesaos\Defender\Role $role, string $readableName = null ) : array | ||
$permission | string | |
$role | Artesaos\Defender\Role | Role or array of where clausules. |
$readableName | string | Permission readable name. |
return | array | Array containing created $permission and $role. |
protected createPermission ( string $name, string $readableName = null ) : Artesaos\Defender\Permission | ||
$name | string | |
$readableName | string | |
return | Artesaos\Defender\Permission |
protected notSeePermissionAttachedToRoleInDatabase ( Artesaos\Defender\Permission $permission, Artesaos\Defender\Role $role ) | ||
$permission | Artesaos\Defender\Permission | |
$role | Artesaos\Defender\Role |
protected notSeePermissionAttachedToUserInDatabase ( Artesaos\Defender\Permission $permission, |
||
$permission | Artesaos\Defender\Permission | |
$user |
protected seePermissionAttachedToRoleInDatabase ( Artesaos\Defender\Permission $permission, Artesaos\Defender\Role $role ) | ||
$permission | Artesaos\Defender\Permission | |
$role | Artesaos\Defender\Role |
protected seePermissionAttachedToUserInDatabase ( Artesaos\Defender\Permission $permission, |
||
$permission | Artesaos\Defender\Permission | |
$user |
public testShouldAttachPermissionToRole ( ) |
public testShouldCreatePermission ( ) |
public testUserShouldHasPermissionsTrait ( ) |
protected array $providers | ||
return | array |