/** * @expectedException \Propel\Runtime\Exception\BadMethodCallException */ public function testDeleteOnReadOnlyEntityThrowsException() { $col = new ArrayCollection(); $col->setModel('ContestView'); $cv = new ContestView(); $cv->setNew(false); $col[] = $cv; $col->delete(); }
/** * @expectedException \Propel\Runtime\Exception\PropelException */ public function testDeleteOnReadOnlyEntityThrowsException() { $col = new ObjectCollection(); $col->setModel('\\Propel\\Tests\\Bookstore\\ContestView'); $cv = new ContestView(); $cv->setNew(false); $col[] = $cv; $col->delete(); }