mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Added test for #5662 (calling delete twice) (from r108025)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112708 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
bcdf352a71
commit
d30b478690
@ -951,6 +951,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…
Reference in New Issue
Block a user