コード例 #1
0
 /**
  * This could fail when date format is interpreted incorrect (bug #703)
  */
 public function testPostDataToDbEn()
 {
     $this->setLocaleTo('en');
     $model = $this->getModel();
     $row = $model->loadFirst();
     $date = $row['grs_birthday'];
     $postData = $date->get($this->_model->get('grs_birthday', 'dateFormat'));
     $postRow = array('grs_birthday' => $postData) + $row;
     $postRow = $this->_model->processAfterLoad(array($postRow), false, true);
     $rowsaved = $model->save($postRow);
     $this->assertEquals($row['grs_birthday']->get('yyyy-MM-dd'), $rowsaved[0]['grs_birthday']->get('yyyy-MM-dd'));
 }
コード例 #2
0
 /**
  * The maximum length of the result field
  *
  * @return int
  */
 protected function _getResultFieldLength()
 {
     if (null !== $this->resultFieldLength) {
         return $this->resultFieldLength;
     }
     if (null !== self::$staticResultFieldLength) {
         $this->resultFieldLength = self::$staticResultFieldLength;
         return $this->resultFieldLength;
     }
     $model = new \MUtil_Model_TableModel('gems__tokens');
     self::$staticResultFieldLength = $model->get('gto_result', 'maxlength');
     $this->resultFieldLength = self::$staticResultFieldLength;
     return $this->resultFieldLength;
 }