committed by
Julius Härtl
parent
367873beaa
commit
137f429cfa
@@ -29,7 +29,7 @@ class AclTest extends \Test\TestCase {
|
||||
$acl = new Acl();
|
||||
$acl->setId(1);
|
||||
$acl->setParticipant("admin");
|
||||
$acl->setType("user");
|
||||
$acl->setType(Acl::PERMISSION_TYPE_USER);
|
||||
$acl->setBoardId(1);
|
||||
$acl->setPermissionEdit(true);
|
||||
$acl->setPermissionShare(true);
|
||||
@@ -41,7 +41,7 @@ class AclTest extends \Test\TestCase {
|
||||
$acl = new Acl();
|
||||
$acl->setId(1);
|
||||
$acl->setParticipant("administrators");
|
||||
$acl->setType("group");
|
||||
$acl->setType(Acl::PERMISSION_TYPE_GROUP);
|
||||
$acl->setBoardId(1);
|
||||
$acl->setPermissionEdit(true);
|
||||
$acl->setPermissionShare(true);
|
||||
@@ -54,7 +54,7 @@ class AclTest extends \Test\TestCase {
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'participant' => 'admin',
|
||||
'type' => 'user',
|
||||
'type' => Acl::PERMISSION_TYPE_USER,
|
||||
'boardId' => 1,
|
||||
'permissionEdit' => true,
|
||||
'permissionShare' => true,
|
||||
@@ -65,7 +65,7 @@ class AclTest extends \Test\TestCase {
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'participant' => 'administrators',
|
||||
'type' => 'group',
|
||||
'type' => Acl::PERMISSION_TYPE_GROUP,
|
||||
'boardId' => 1,
|
||||
'permissionEdit' => true,
|
||||
'permissionShare' => true,
|
||||
@@ -80,7 +80,7 @@ class AclTest extends \Test\TestCase {
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'participant' => 'admin',
|
||||
'type' => 'user',
|
||||
'type' => Acl::PERMISSION_TYPE_USER,
|
||||
'boardId' => 1,
|
||||
'permissionEdit' => true,
|
||||
'permissionShare' => true,
|
||||
|
||||
@@ -66,10 +66,10 @@ class UnknownUserTest extends \Test\TestCase {
|
||||
$this->getBoard(1,'Test', 'admin'),
|
||||
];
|
||||
$acl = [
|
||||
$this->getAcl('user', 'existing', 1),
|
||||
$this->getAcl('user', 'not existing', 1),
|
||||
$this->getAcl('group', 'existing', 1),
|
||||
$this->getAcl('group', 'not existing', 1),
|
||||
$this->getAcl(Acl::PERMISSION_TYPE_USER, 'existing', 1),
|
||||
$this->getAcl(Acl::PERMISSION_TYPE_USER, 'not existing', 1),
|
||||
$this->getAcl(Acl::PERMISSION_TYPE_GROUP, 'existing', 1),
|
||||
$this->getAcl(Acl::PERMISSION_TYPE_GROUP, 'not existing', 1),
|
||||
];
|
||||
$this->aclMapper->expects($this->at(0))
|
||||
->method('findAll')
|
||||
@@ -109,7 +109,7 @@ class UnknownUserTest extends \Test\TestCase {
|
||||
|
||||
|
||||
/** @return Acl */
|
||||
public function getAcl($type='user', $participant='admin', $boardId=123) {
|
||||
public function getAcl($type=Acl::PERMISSION_TYPE_USER, $participant='admin', $boardId=123) {
|
||||
$acl = new Acl();
|
||||
$acl->setParticipant($participant);
|
||||
$acl->setType($type);
|
||||
|
||||
Reference in New Issue
Block a user