mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
18 lines
526 B
PHP
18 lines
526 B
PHP
<?php
|
|
/**
|
|
* @package framework
|
|
* @subpackage tests
|
|
*/
|
|
class PermissionRoleTest extends FunctionalTest {
|
|
static $fixture_file = 'PermissionRoleTest.yml';
|
|
|
|
function testDelete() {
|
|
$role = $this->objFromFixture('PermissionRole', 'role');
|
|
|
|
$role->delete();
|
|
|
|
$this->assertEquals(0, DataObject::get('PermissionRole', "\"ID\"={$role->ID}")->count(), 'Role is removed');
|
|
$this->assertEquals(0, DataObject::get('PermissionRoleCode',"\"RoleID\"={$role->ID}")->count(), 'Permissions removed along with the role');
|
|
}
|
|
}
|