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:
Sam Minnee 2010-10-18 22:40:56 +00:00
parent bcdf352a71
commit d30b478690

View File

@ -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 {