public function testTest() { Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_VALIDATE, Doctrine::VALIDATE_ALL); $user = new Ticket_1716_User(); $user->username = '******'; $user->password = '******'; try { $user->save(); $this->pass(); } catch (Exception $e) { $this->fail('Validation should not have failed'); } Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_VALIDATE, Doctrine::VALIDATE_NONE); }
public function testTest() { Doctrine_Manager::getInstance()->setAttribute('validate', 'all'); $user = new Ticket_1716_User(); $user->username = '******'; $user->password = '******'; try { $user->save(); $this->pass(); } catch (Exception $e) { $this->fail('Validation should not have failed'); } Doctrine_Manager::getInstance()->setAttribute('validate', false); }