public function testSalvadoEnCascadaConLoop() { /** * Instancias: * a1->a2 * a2->a3 * a3->a1 */ $p1 = new Pagina(array("titulo" => "Pagina raiz", "contenido" => "This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don't really have to worry about it. It can be useful later on if you're trying to...")); $p2 = new Pagina(array("titulo" => "Subpagina de raiz 1", "contenido" => "This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don't really have to worry about it. It can be useful later on if you're trying to...", "owner" => $p1)); $p3 = new Pagina(array("titulo" => "Sub subpagina de raiz 1", "contenido" => "This step is usually done transparently as most compilers perform it and then invoke the assembler themselves, so you don't really have to worry about it. It can be useful later on if you're trying to...", "owner" => $p2)); $p1->addToSubpages($p2); $p2->addToSubpages($p3); $p3->addToSubpages($p1); //Logger::getInstance()->on(); $str = '<pre>' . print_r($p1, true) . '</pre>'; $this->assert($p1->save(), 'TestCaseA004.testSalvadoEnCascadaConLoop: Test salvar hasMany en cascada', array('errors' => $str)); //Logger::getInstance()->off(); // TODO: test que verifique que se guardo todo y que se pueden cargar todas las relaciones }