Exemple #1
0
 public function testTest()
 {
     Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_VALIDATE, Doctrine::VALIDATE_ALL);
     try {
         $foo = new Ticket_1818_Foo();
         $foo->Bar = new Ticket_1818_BarA();
         $foo->Bar->type = 'A';
         $foo->save();
         $this->pass();
     } catch (Exception $e) {
         $this->fail();
     }
     Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_VALIDATE, Doctrine::VALIDATE_NONE);
 }
 public function testTest()
 {
     Doctrine_Manager::getInstance()->setAttribute('validate', 'all');
     try {
         $foo = new Ticket_1818_Foo();
         $foo->Bar = new Ticket_1818_BarA();
         $foo->Bar->type = 'A';
         $foo->save();
         $this->pass();
     } catch (Exception $e) {
         $this->fail();
     }
     Doctrine_Manager::getInstance()->setAttribute('validate', 'none');
 }