mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-07 10:11:17 +02:00
API CHANGE: augmentSQL is now passed a DataQuery object from which query parameters can be extracted. API CHANGE: DataObjectDecorators that manipulate the query can now define augmentDataQueryCreation(). API CHANGE: The container class argument for DataObject::get() is deprecated. API CHANGE: DataObject::buildSQL() and DataObject::extendedSQL() are deprecated; just use DataObject::get() now. API CHANGE: DataObject::instance_get() and DataObject::instance_get_one() are deprecated, and can no longer be overloaded. API CHANGE: DataObject::buildDataObjectSet() is deprecated. API CHANGE: Cant't call manual manipulation methods on DataList such as insertFirst()
18 lines
525 B
PHP
18 lines
525 B
PHP
<?php
|
|
/**
|
|
* @package sapphire
|
|
* @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');
|
|
}
|
|
}
|