mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-27 13:06:04 +02:00
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@92878 467b73ca-7a2a-4603-9d3b-597d59a354a9
24 lines
555 B
PHP
24 lines
555 B
PHP
<?php
|
|
/**
|
|
* @package sapphire
|
|
* @subpackage tests
|
|
*/
|
|
class PermissionCheckboxSetFieldTest extends SapphireTest {
|
|
function testHiddenPermissions() {
|
|
$f = new PermissionCheckboxSetField(
|
|
'Permissions',
|
|
'Permissions',
|
|
'Permission',
|
|
'GroupID'
|
|
);
|
|
$f->setHiddenPermissions(
|
|
array('CMS_ACCESS_ReportAdmin')
|
|
);
|
|
$this->assertEquals(
|
|
$f->getHiddenPermissions(),
|
|
array('CMS_ACCESS_ReportAdmin')
|
|
);
|
|
$this->assertContains('CMS_ACCESS_CMSMain', $f->Field());
|
|
$this->assertNotContains('CMS_ACCESS_ReportAdmin', $f->Field());
|
|
}
|
|
} |