mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR: Added test for #5662 (calling delete twice)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108025 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
cc1584cf12
commit
9f5c68cfbc
@ -952,6 +952,24 @@ class DataObjectTest extends SapphireTest {
|
||||
);
|
||||
}
|
||||
|
||||
public function testInvalidate() {
|
||||
$do = new DataObjectTest_Fixture();
|
||||
$do->write();
|
||||
|
||||
$do->delete();
|
||||
|
||||
try {
|
||||
// Prohibit invalid object manipulation
|
||||
$do->delete();
|
||||
$do->write();
|
||||
$do->duplicate();
|
||||
}
|
||||
catch(Exception $e) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->fail('Should throw an exception');
|
||||
}
|
||||
}
|
||||
|
||||
class DataObjectTest_Player extends Member implements TestOnly {
|
||||
|
Loading…
x
Reference in New Issue
Block a user