Ignore:
Timestamp:
2014/06/15 02:04:23 (10 years ago)
Author:
shutta
Message:

#1993 [共通クラス]SC_Product
dtb_classテーブルのデータ初期化が漏れていたので追加。(必要なデータはクラス内で用意させる)
setUp周りの冗長な処理を改善。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/tests/class/SC_Product/SC_Product_TestBase.php

    r23543 r23555  
    6767            $this->objQuery->insert('dtb_products_class', $item); 
    6868        } 
     69 
     70        $this->setUpClass(); 
    6971        $this->setUpClassCategory(); 
    7072        $this->setUpProducts(); 
     73    } 
     74 
     75    /** 
     76     * DBに規格分類情報を登録します. 
     77     */ 
     78    protected function setUpClass() 
     79    { 
     80        $table = 'dtb_class'; 
     81 
     82        $data = array( 
     83            array( 
     84                'class_id' => 1, 
     85                'name' => '味', 
     86                'rank' => 1, 
     87                'creator_id' => 1, 
     88                'update_date' => 'CURRENT_TIMESTAMP', 
     89            ), 
     90        ); 
     91 
     92        $this->objQuery->delete($table); 
     93        foreach ($data as $item) { 
     94            $this->objQuery->insert($table, $item); 
     95        } 
    7196    } 
    7297 
Note: See TracChangeset for help on using the changeset viewer.