/** * Тесты каскадов * */ public function testCascade() { $source = new EmailSource(); $source->setName('name'); $source->setEmailList('email'); $source->save(); $id = $source->getId(); $parser = new EmailParser(); $parser->setName('parser'); $parser->setEmailSourceId($id); $parser->setSubjectRegexp("subj"); $parser->save(); $parserId = $parser->getId(); $source->delete(); $findParser = Doctrine::getTable("EmailParser")->find($parserId); $this->assertEquals($findParser, null); }