Ignore:
Timestamp:
2013/01/06 17:36:52 (11 years ago)
Author:
shift_hiroko.tamagawa
Message:

#1978 SC_Helper_Purchaseの単体テスト完了

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php

    r22203 r22204  
    4747  protected function setUpShipping($shipping) { 
    4848    if (!$shipping) { 
    49       $shipping = getSingleShipping();  
     49      $shipping = $this->getSingleShipping();  
    5050    } 
    5151 
     
    8585    $shippings = array( 
    8686      array( 
    87         'update_date' => 'CURRENT_TIMESTAMP', 
     87        'update_date' => '2000-01-01 00:00:00', 
    8888        'shipping_id' => '1', 
    8989        'order_id' => '1', 
     
    9292      ), 
    9393      array( 
    94         'update_date' => 'CURRENT_TIMESTAMP', 
     94        'update_date' => '2000-01-01 00:00:00', 
    9595        'shipping_id' => '2', 
    9696        'order_id' => '2', 
     
    9999      ), 
    100100      array( 
    101         'update_date' => 'CURRENT_TIMESTAMP', 
     101        'update_date' => '2000-01-01 00:00:00', 
    102102        'shipping_id' => '1002', 
    103103        'order_id' => '1002', 
     
    147147      $product_class = array( 
    148148        array( 
    149           'update_date' => 'CURRENT_TIMESTAMP', 
     149          'update_date' => '2000-01-01 00:00:00', 
    150150          'product_class_id' => '1001', 
    151151          'product_id' => '1001', 
     
    160160        ), 
    161161        array( 
    162           'update_date' => 'CURRENT_TIMESTAMP', 
     162          'update_date' => '2000-01-01 00:00:00', 
    163163          'product_class_id' => '1002', 
    164164          'product_id' => '1002', 
     
    184184    $class_category = array( 
    185185      array( 
    186         'update_date' => 'CURRENT_TIMESTAMP', 
     186        'update_date' => '2000-01-01 00:00:00', 
    187187        'classcategory_id' => '1001', 
    188188        'class_id' => '1', 
     
    191191      ), 
    192192      array( 
    193         'update_date' => 'CURRENT_TIMESTAMP', 
     193        'update_date' => '2000-01-01 00:00:00', 
    194194        'classcategory_id' => '1002', 
    195195        'class_id' => '1', 
     
    211211   $products = array( 
    212212     array( 
    213        'update_date' => 'CURRENT_TIMESTAMP', 
     213       'update_date' => '2000-01-01 00:00:00', 
    214214       'product_id' => '1001', 
    215215       'name' => '製品名1001', 
     
    219219     ), 
    220220     array( 
    221        'update_date' => 'CURRENT_TIMESTAMP', 
     221       'update_date' => '2000-01-01 00:00:00', 
    222222       'product_id' => '1002', 
    223223       'name' => '製品名1002', 
     
    299299       'creator_id' => '1', 
    300300       'del_flg' => '1', 
    301        'update_date' => 'CURRENT_TIMESTAMP' 
     301       'update_date' => '2000-01-01 00:00:00' 
    302302     ), 
    303303     array( 
     
    307307       'creator_id' => '1', 
    308308       'rank' => '2', 
    309        'update_date' => 'CURRENT_TIMESTAMP' 
     309       'update_date' => '2000-01-01 00:00:00' 
    310310     ), 
    311311     array( 
     
    315315       'creator_id' => '1', 
    316316       'rank' => '3', 
    317        'update_date' => 'CURRENT_TIMESTAMP' 
     317       'update_date' => '2000-01-01 00:00:00' 
    318318     ), 
    319319     array( // 商品種別違い 
     
    323323       'creator_id' => '1', 
    324324       'rank' => '4', 
    325        'update_date' => 'CURRENT_TIMESTAMP' 
     325       'update_date' => '2000-01-01 00:00:00' 
    326326     ), 
    327327   ); 
     
    367367   $payment = array( 
    368368     array( 
    369        'update_date' => 'CURRENT_TIMESTAMP', 
     369       'update_date' => '2000-01-01 00:00:00', 
    370370       'payment_id' => '1001', 
    371371       'creator_id' => '1', 
     
    373373     ), 
    374374     array( 
    375        'update_date' => 'CURRENT_TIMESTAMP', 
     375       'update_date' => '2000-01-01 00:00:00', 
    376376       'payment_id' => '1002', 
    377377       'creator_id' => '1', 
     
    380380     ), 
    381381     array( 
    382        'update_date' => 'CURRENT_TIMESTAMP', 
     382       'update_date' => '2000-01-01 00:00:00', 
    383383       'payment_id' => '1003', 
    384384       'creator_id' => '1', 
     
    386386     ), 
    387387     array( 
    388        'update_date' => 'CURRENT_TIMESTAMP', 
     388       'update_date' => '2000-01-01 00:00:00', 
    389389       'payment_id' => '3001', 
    390390       'creator_id' => '1', 
     
    393393     ), 
    394394     array( 
    395        'update_date' => 'CURRENT_TIMESTAMP', 
     395       'update_date' => '2000-01-01 00:00:00', 
    396396       'payment_id' => '3002', 
    397397       'creator_id' => '1', 
     
    399399     ), 
    400400     array( 
    401        'update_date' => 'CURRENT_TIMESTAMP', 
     401       'update_date' => '2000-01-01 00:00:00', 
    402402       'payment_id' => '3003', 
    403403       'creator_id' => '1', 
     
    406406     ), 
    407407     array( 
    408        'update_date' => 'CURRENT_TIMESTAMP', 
     408       'update_date' => '2000-01-01 00:00:00', 
    409409       'payment_id' => '3004', 
    410410       'creator_id' => '1', 
     
    413413     ), 
    414414     array( 
    415        'update_date' => 'CURRENT_TIMESTAMP', 
     415       'update_date' => '2000-01-01 00:00:00', 
    416416       'payment_id' => '3005', 
    417417       'creator_id' => '1', 
     
    434434    $order = array( 
    435435      array( 
    436         'update_date' => 'CURRENT_TIMESTAMP', 
     436        'update_date' => '2000-01-01 00:00:00', 
    437437        'order_id' => '1001', 
    438438        'customer_id' => '1001', 
    439439        'order_name01' => '受注情報01', 
    440440        'status' => '3', 
    441         'payment_date' => '2032-12-31 01:20:30' // 日付が変わっても良いように、遠い未来に設定 
     441        'payment_date' => '2032-12-31 01:20:30', // 日付が変わっても良いように、遠い未来に設定 
     442        'use_point' => '10', 
     443        'add_point' => '20' 
    442444      ), 
    443445      array( 
    444         'update_date' => 'CURRENT_TIMESTAMP', 
     446        'update_date' => '2000-01-01 00:00:00', 
    445447        'order_id' => '1002', 
    446448        'customer_id' => '1002', 
    447449        'order_name01' => '受注情報02', 
     450        'status' => '5', 
    448451        'payment_id' => '1002', 
    449452        'payment_method' => '支払方法1001', 
    450         'deliv_id' => '1002' 
     453        'deliv_id' => '1002', 
     454        'use_point' => '10', 
     455        'add_point' => '20' 
    451456      ) 
    452457    ); 
     
    464469    $order = array( 
    465470      array( 
    466         'update_date' => 'CURRENT_TIMESTAMP', 
     471        'update_date' => '2000-01-01 00:00:00', 
    467472        'order_temp_id' => '1001', 
    468473        'customer_id' => '1001', 
    469         'order_name01' => '受注情報01' 
     474        'order_name01' => '受注情報01', 
     475        'order_id' => '1001' 
    470476      ), 
    471477      array( 
    472         'update_date' => 'CURRENT_TIMESTAMP', 
     478        'update_date' => '2000-01-01 00:00:00', 
    473479        'order_temp_id' => '1002', 
    474480        'customer_id' => '1002', 
     
    535541 } 
    536542 
     543 /** 
     544  * DBに顧客情報を設定します。 
     545  */ 
     546 protected function setUpCustomer() { 
     547   $customer = array( 
     548     array( 
     549       'customer_id' => '1001', 
     550       'name01' => '苗字', 
     551       'name02' => '名前', 
     552       'kana01' => 'みょうじ', 
     553       'kana02' => 'なまえ', 
     554       'email' => 'test@example.com', 
     555       'secret_key' => 'hoge', 
     556       'point' => '100', 
     557       'update_date' => '2000-01-01 00:00:00' 
     558     ), 
     559     array( 
     560       'customer_id' => '1002', 
     561       'name01' => '苗字2', 
     562       'name02' => '名前2', 
     563       'kana01' => 'みょうじ2', 
     564       'kana02' => 'なまえ2', 
     565       'email' => 'test2@example.com', 
     566       'secret_key' => 'hoge2', 
     567       'point' => '200', 
     568       'update_date' => '2000-01-01 00:00:00' 
     569     ) 
     570   ); 
     571 
     572   $this->objQuery->delete('dtb_customer'); 
     573   foreach ($customer as $item) { 
     574     $this->objQuery->insert('dtb_customer', $item); 
     575   } 
     576 } 
     577 
    537578} 
    538579 
Note: See TracChangeset for help on using the changeset viewer.