PHP 클래스 Artesaos\Defender\Testing\EloquentPermissionRepositoryTest

상속: extends AbstractTestCase
파일 보기 프로젝트 열기: artesaos/defender

보호된 프로퍼티들

프로퍼티 타입 설명
$providers array Array of service providers.

공개 메소드들

메소드 설명
setUp ( )
testShouldAttachPermissionToRole ( ) Testing if permission is attached to role.
testShouldCreatePermission ( ) Testing the criation of permissions.
testUserShouldHasPermissionsTrait ( ) Asserting if the User model has traits.

보호된 메소드들

메소드 설명
createAndAttachPermission ( string $permission, User | array $user, string $readableName = null ) : array 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, User $user ) 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, User $user ) Assert to see in Database a Permission attached to User.

메소드 상세

createAndAttachPermission() 보호된 메소드

Create and Attach a Permission to User.
protected createAndAttachPermission ( string $permission, User | array $user, string $readableName = null ) : array
$permission string
$user User | array User or array of where clausules.
$readableName string Permission readable name.
리턴 array Array containing created $permission and $user.

createAndAttachPermissionToRole() 보호된 메소드

Create and Attach a Permission 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.
리턴 array Array containing created $permission and $role.

createPermission() 보호된 메소드

Create a permission and assert to see in database.
protected createPermission ( string $name, string $readableName = null ) : Artesaos\Defender\Permission
$name string
$readableName string
리턴 Artesaos\Defender\Permission

notSeePermissionAttachedToRoleInDatabase() 보호된 메소드

Assert to not see in Database a Permission attached to Role.
protected notSeePermissionAttachedToRoleInDatabase ( Artesaos\Defender\Permission $permission, Artesaos\Defender\Role $role )
$permission Artesaos\Defender\Permission
$role Artesaos\Defender\Role

notSeePermissionAttachedToUserInDatabase() 보호된 메소드

Assert to not see in Database a Permission attached to User.
protected notSeePermissionAttachedToUserInDatabase ( Artesaos\Defender\Permission $permission, User $user )
$permission Artesaos\Defender\Permission
$user User

seePermissionAttachedToRoleInDatabase() 보호된 메소드

Assert to see in Database a Permission attached to Role.
protected seePermissionAttachedToRoleInDatabase ( Artesaos\Defender\Permission $permission, Artesaos\Defender\Role $role )
$permission Artesaos\Defender\Permission
$role Artesaos\Defender\Role

seePermissionAttachedToUserInDatabase() 보호된 메소드

Assert to see in Database a Permission attached to User.
protected seePermissionAttachedToUserInDatabase ( Artesaos\Defender\Permission $permission, User $user )
$permission Artesaos\Defender\Permission
$user User

setUp() 공개 메소드

public setUp ( )

testShouldAttachPermissionToRole() 공개 메소드

Testing if permission is attached to role.

testShouldCreatePermission() 공개 메소드

Testing the criation of permissions.

testUserShouldHasPermissionsTrait() 공개 메소드

Asserting if the User model has traits.

프로퍼티 상세

$providers 보호되어 있는 프로퍼티

Array of service providers.
protected array $providers
리턴 array