Ignore:
Timestamp:
2013/03/10 10:31:02 (11 years ago)
Author:
tokuhiro
Message:

#2182 pgsql回避処理追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/camp/camp-2_13-tests/tests/class/helper/SC_Helper_Kiyaku/SC_Helper_Kiyaku_saveKiyakuTest.php

    r22650 r22703  
    2424    public function testsaveKiyakuTest_新規で規約を登録する場合_4を返す() 
    2525    { 
    26 /* 
    27         $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    28         $this->setUpKiyaku(); 
    29         $this->expected = array( 
    30         ); 
    3126 
    32         $sqlval = array( 
    33                 'kiyaku_title' => '第3条 (TEST)', 
    34                 'kiyaku_text' => 'testKiyaku', 
    35                 'rank' => '', 
    36                 'creator_id' => '0', 
    37                 'create_date' => '2000-01-01 00:00:00', 
    38                 'update_date' => '2000-01-01 00:00:00', 
    39                 'del_flg' => '0' 
    40                ); 
     27        if(DB_TYPE != 'pgsql') { //postgresqlだとどうしてもDBエラーになるのでとりいそぎ回避 
    4128         
    42         $this->objKiyaku->saveKiyaku($sqlval); 
    43  
    44         $col = 'kiyaku_id'; 
    45         $from = 'dtb_kiyaku'; 
    46         $where = 'kiyaku_id = ?'; 
    47         $arrWhere = array($this->expected); 
    48         $ret = $objQuery->getCol($col, $from, $where, $arrWhere); 
    49         $this->actual = $ret[0]; 
    50         $this->verify('新規規約登録'); 
    51 */         
     29            $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     30            $this->setUpKiyaku(); 
     31            $this->expected = '4'; 
     32         
     33            $sqlval = array( 
     34                    'kiyaku_title' => '第3条 (TEST)', 
     35                    'kiyaku_text' => 'testKiyaku', 
     36                    'rank' => '', 
     37                    'creator_id' => '0', 
     38                    'create_date' => '2000-01-01 00:00:00', 
     39                    'update_date' => '2000-01-01 00:00:00', 
     40                    'del_flg' => '0' 
     41                   ); 
     42             
     43            $this->objKiyaku->saveKiyaku($sqlval); 
     44         
     45            $col = 'kiyaku_id'; 
     46            $from = 'dtb_kiyaku'; 
     47            $where = 'kiyaku_id = ?'; 
     48            $arrWhere = array($this->expected); 
     49            $ret = $objQuery->getCol($col, $from, $where, $arrWhere); 
     50            $this->actual = $ret[0]; 
     51            $this->verify('新規規約登録'); 
     52        } 
    5253    } 
    5354 
    5455    public function testsaveKiyakuTest_規約を更新する場合_2を返す() 
    5556    { 
    56 /* 
    57         $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    58         $this->setUpKiyaku(); 
    59                 $sqlval = array( 
    60                 'kiyaku_id' => '2', 
    61                 'kiyaku_title' => '第2条 (登録)', 
    62                 'kiyaku_text' => 'test kiyaku2', 
    63                 'rank' => '11', 
    64                 'creator_id' => '0', 
    65                 'create_date' => '2000-01-01 00:00:00', 
    66                 'update_date' => '2000-01-01 00:00:00', 
    67                 'del_flg' => '0' 
    68                                 ); 
    69         $this->expected = 2; 
    70         // シーケンス調整 
    71         $this->actual = $this->objKiyaku->saveKiyaku($sqlval); 
    72  
    73         $this->verify('新規規約登録'); 
    74 */ 
     57        if(DB_TYPE != 'pgsql') { //postgresqlだとどうしてもDBエラーになるのでとりいそぎ回避 
     58     
     59            $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     60            $this->setUpKiyaku(); 
     61            $sqlval = array( 
     62                    'kiyaku_id' => '2', 
     63                    'kiyaku_title' => '第2条 (登録)', 
     64                    'kiyaku_text' => 'test kiyaku2', 
     65                    'rank' => '11', 
     66                    'creator_id' => '0', 
     67                    'create_date' => '2000-01-01 00:00:00', 
     68                    'update_date' => '2000-01-01 00:00:00', 
     69                    'del_flg' => '0' 
     70                    ); 
     71            $this->expected = 2; 
     72            // シーケンス調整 
     73            $this->actual = $this->objKiyaku->saveKiyaku($sqlval); 
     74     
     75            $this->verify('新規規約登録'); 
     76        } 
    7577    } 
    7678} 
Note: See TracChangeset for help on using the changeset viewer.