mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-06 01:31:22 +02:00
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit. This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
20 lines
539 B
PHP
20 lines
539 B
PHP
<?php
|
|
/**
|
|
* @package framework
|
|
* @subpackage tests
|
|
*/
|
|
class PermissionRoleTest extends FunctionalTest {
|
|
static $fixture_file = 'PermissionRoleTest.yml';
|
|
|
|
public 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');
|
|
}
|
|
}
|