mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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());
|
||
|
}
|
||
|
}
|