Example #1
0
 function testDameMatriculaDeCiclo()
 {
     $planId = 1;
     $institId = 2;
     $ofertaId = 1;
     $matricula = $this->Plan->dameMatriculaDeCiclo($planId);
     $this->Plan->recursive = 1;
     $plan = $this->Plan->read(null, $planId);
     $contMatricula = 0;
     foreach ($plan['Anio'] as $a) {
         $contMatricula += $a['matricula'];
     }
     $this->assertEqual($contMatricula, $matricula);
     $planId = 1;
     $matricula = $this->Plan->dameMatriculaDeCiclo($planId, 2010);
     $this->assertEqual(2, $matricula);
 }