Changeset 23356


Ignore:
Timestamp:
2014/03/27 18:04:02 (10 years ago)
Author:
kimoto
Message:

#2485 テストデータが矛盾しているので修正

Location:
branches/version-2_13-dev/tests/class/helper/SC_Helper_Purchase
Files:
3 edited

Legend:

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

    r22857 r23356  
    5151  { 
    5252    if (!$shipping) { 
    53       $shipping = $this->getSingleShipping();  
     53      $shipping = $this->getSingleShipping(); 
    5454    } 
    5555 
     
    9494        'update_date' => '2000-01-01 00:00:00', 
    9595        'shipping_id' => '1', 
    96         'order_id' => '1', 
     96        'order_id' => '1001', 
    9797        'shipping_name01' => '配送情報01', 
    9898        'shipping_date' => '2012-01-12' 
     
    129129          'shipping_id' => '1', 
    130130          'product_class_id' => '1001', 
    131           'order_id' => '1', 
     131          'order_id' => '1001', 
    132132          'product_name' => '商品名01', 
    133133          'price' => '1500' 
     
    136136          'shipping_id' => '1', 
    137137          'product_class_id' => '1002', 
    138           'order_id' => '1', 
     138          'order_id' => '1001', 
    139139          'product_name' => '商品名02', 
    140140          'price' => '2400' 
     
    218218  } 
    219219 
    220   /**  
     220  /** 
    221221   * DBに製品情報を登録します. 
    222222   */ 
     
    301301   } 
    302302 } 
    303   
     303 
    304304 /** 
    305305  * DBに配送業者の情報を登録します. 
  • branches/version-2_13-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php

    r22857 r23356  
    3939    parent::setUp(); 
    4040    $this->setUpShipmentItem(); 
     41    $this->setUpOrderDetail(); 
    4142  } 
    4243 
     
    7172  public function testGetShipmentItems_存在する受注IDと配送先IDを指定した場合_結果が取得できる() 
    7273  { 
    73     $order_id = '1'; 
     74    $order_id = '1001'; 
    7475    $shipping_id = '1'; 
    75      
     76 
    7677    $this->expected['count'] = 2; 
    77     $this->expected['first'] = array( 
    78       'order_id' => '1', 
     78    $this->expected['second'] = array( 
     79      'order_id' => '1001', 
    7980      'shipping_id' => '1', 
    8081      'product_class_id' => '1001', 
     
    8384      'productsClass' => array('product_class_id' => '1001', 'product_id' => '1001') 
    8485    ); 
    85     $this->expected['second'] = array( 
    86       'order_id' => '1', 
     86    $this->expected['first'] = array( 
     87      'order_id' => '1001', 
    8788      'shipping_id' => '1', 
    8889      'product_class_id' => '1002', 
     
    9495    $result = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id); 
    9596    $this->actual['count'] = count($result); 
     97 
    9698    $this->actual['first'] = Test_Utils::mapArray($result[0], array( 
    9799      'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass')); 
     
    105107  public function testGetShipmentItems_詳細フラグをOFFにした場合_結果に詳細情報が含まれない() 
    106108  { 
    107     $order_id = '1'; 
     109    $order_id = '1001'; 
    108110    $shipping_id = '1'; 
    109      
     111 
    110112    $this->expected['count'] = 2; 
    111     $this->expected['first'] = array( 
    112       'order_id' => '1', 
     113    $this->expected['second'] = array( 
     114      'order_id' => '1001', 
    113115      'shipping_id' => '1', 
    114116      'product_class_id' => '1001', 
     
    117119      'productsClass' => null 
    118120    ); 
    119     $this->expected['second'] = array( 
    120       'order_id' => '1', 
     121    $this->expected['first'] = array( 
     122      'order_id' => '1001', 
    121123      'shipping_id' => '1', 
    122124      'product_class_id' => '1002', 
  • branches/version-2_13-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php

    r22857 r23356  
    4141    $this->setUpShipmentItem(); 
    4242    $this->setUpShippingOnDb(); 
     43    $this->setUpOrderDetail(); 
    4344  } 
    4445 
     
    6263  public function testGetShippings_存在する受注IDを指定した場合_結果が取得できる() 
    6364  { 
    64     $order_id = '1'; 
    65    
     65    $order_id = '1001'; 
     66 
    6667    $this->expected['count'] = 1; 
    6768    $this->expected['first'] = array( 
    68       'order_id' => '1', 
     69      'order_id' => '1001', 
    6970      'shipping_id' => '1', 
    7071      'shipping_name01' => '配送情報01', 
     
    7980    $this->actual['first'] = Test_Utils::mapArray($result['1'], array( 
    8081      'order_id', 'shipping_id', 'shipping_name01', 'shipping_date')); 
    81     $this->actual['shipment_item_count'] = count($result['1']['shipment_item']);  
     82    $this->actual['shipment_item_count'] = count($result['1']['shipment_item']); 
    8283    $this->verify('配送情報'); 
    8384  } 
     
    8586  public function testGetShippings_商品取得フラグをOFFにした場合_結果に商品情報が含まれない() 
    8687  { 
    87     $order_id = '1'; 
    88      
     88    $order_id = '1001'; 
     89 
    8990    $this->expected['count'] = 1; 
    9091    $this->expected['first'] = array( 
    91       'order_id' => '1', 
     92      'order_id' => '1001', 
    9293      'shipping_id' => '1', 
    9394      'shipping_name01' => '配送情報01', 
Note: See TracChangeset for help on using the changeset viewer.