Changeset 23356
- Timestamp:
- 2014/03/27 18:04:02 (10 years ago)
- 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 51 51 { 52 52 if (!$shipping) { 53 $shipping = $this->getSingleShipping(); 53 $shipping = $this->getSingleShipping(); 54 54 } 55 55 … … 94 94 'update_date' => '2000-01-01 00:00:00', 95 95 'shipping_id' => '1', 96 'order_id' => '1 ',96 'order_id' => '1001', 97 97 'shipping_name01' => '配送情報01', 98 98 'shipping_date' => '2012-01-12' … … 129 129 'shipping_id' => '1', 130 130 'product_class_id' => '1001', 131 'order_id' => '1 ',131 'order_id' => '1001', 132 132 'product_name' => '商品名01', 133 133 'price' => '1500' … … 136 136 'shipping_id' => '1', 137 137 'product_class_id' => '1002', 138 'order_id' => '1 ',138 'order_id' => '1001', 139 139 'product_name' => '商品名02', 140 140 'price' => '2400' … … 218 218 } 219 219 220 /** 220 /** 221 221 * DBに製品情報を登録します. 222 222 */ … … 301 301 } 302 302 } 303 303 304 304 /** 305 305 * DBに配送業者の情報を登録します. -
branches/version-2_13-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShipmentItemsTest.php
r22857 r23356 39 39 parent::setUp(); 40 40 $this->setUpShipmentItem(); 41 $this->setUpOrderDetail(); 41 42 } 42 43 … … 71 72 public function testGetShipmentItems_存在する受注IDと配送先IDを指定した場合_結果が取得できる() 72 73 { 73 $order_id = '1 ';74 $order_id = '1001'; 74 75 $shipping_id = '1'; 75 76 76 77 $this->expected['count'] = 2; 77 $this->expected[' first'] = array(78 'order_id' => '1 ',78 $this->expected['second'] = array( 79 'order_id' => '1001', 79 80 'shipping_id' => '1', 80 81 'product_class_id' => '1001', … … 83 84 'productsClass' => array('product_class_id' => '1001', 'product_id' => '1001') 84 85 ); 85 $this->expected[' second'] = array(86 'order_id' => '1 ',86 $this->expected['first'] = array( 87 'order_id' => '1001', 87 88 'shipping_id' => '1', 88 89 'product_class_id' => '1002', … … 94 95 $result = SC_Helper_Purchase::getShipmentItems($order_id, $shipping_id); 95 96 $this->actual['count'] = count($result); 97 96 98 $this->actual['first'] = Test_Utils::mapArray($result[0], array( 97 99 'order_id', 'shipping_id', 'product_class_id', 'product_name', 'price', 'productsClass')); … … 105 107 public function testGetShipmentItems_詳細フラグをOFFにした場合_結果に詳細情報が含まれない() 106 108 { 107 $order_id = '1 ';109 $order_id = '1001'; 108 110 $shipping_id = '1'; 109 111 110 112 $this->expected['count'] = 2; 111 $this->expected[' first'] = array(112 'order_id' => '1 ',113 $this->expected['second'] = array( 114 'order_id' => '1001', 113 115 'shipping_id' => '1', 114 116 'product_class_id' => '1001', … … 117 119 'productsClass' => null 118 120 ); 119 $this->expected[' second'] = array(120 'order_id' => '1 ',121 $this->expected['first'] = array( 122 'order_id' => '1001', 121 123 'shipping_id' => '1', 122 124 'product_class_id' => '1002', -
branches/version-2_13-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingsTest.php
r22857 r23356 41 41 $this->setUpShipmentItem(); 42 42 $this->setUpShippingOnDb(); 43 $this->setUpOrderDetail(); 43 44 } 44 45 … … 62 63 public function testGetShippings_存在する受注IDを指定した場合_結果が取得できる() 63 64 { 64 $order_id = '1 ';65 65 $order_id = '1001'; 66 66 67 $this->expected['count'] = 1; 67 68 $this->expected['first'] = array( 68 'order_id' => '1 ',69 'order_id' => '1001', 69 70 'shipping_id' => '1', 70 71 'shipping_name01' => '配送情報01', … … 79 80 $this->actual['first'] = Test_Utils::mapArray($result['1'], array( 80 81 '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']); 82 83 $this->verify('配送情報'); 83 84 } … … 85 86 public function testGetShippings_商品取得フラグをOFFにした場合_結果に商品情報が含まれない() 86 87 { 87 $order_id = '1 ';88 88 $order_id = '1001'; 89 89 90 $this->expected['count'] = 1; 90 91 $this->expected['first'] = array( 91 'order_id' => '1 ',92 'order_id' => '1001', 92 93 'shipping_id' => '1', 93 94 'shipping_name01' => '配送情報01',
Note: See TracChangeset
for help on using the changeset viewer.