- Timestamp:
- 2013/02/04 20:23:57 (11 years ago)
- Location:
- branches/version-2_12_3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12_3/data/class/helper/SC_Helper_Address.php
r22206 r22497 37 37 * @return array() 38 38 */ 39 function save($sqlval) {39 function registAddress($sqlval) { 40 40 $objQuery =& SC_Query_Ex::getSingletonInstance(); 41 41 $customer_id = $sqlval['customer_id']; … … 77 77 * @return array() 78 78 */ 79 function get ($other_deliv_id) {79 function getAddress($other_deliv_id) { 80 80 $objQuery =& SC_Query_Ex::getSingletonInstance(); 81 81 $address = $objQuery->select('*', 'dtb_other_deliv', 'other_deliv_id = ?', array($other_deliv_id)); … … 106 106 * @return void 107 107 */ 108 function delete ($other_deliv_id) {108 function deleteAddress($other_deliv_id) { 109 109 $where = 'other_deliv_id = ?'; 110 110 $objQuery =& SC_Query_Ex::getSingletonInstance(); -
branches/version-2_12_3/data/class/pages/mypage/LC_Page_Mypage_Delivery.php
r22206 r22497 85 85 } 86 86 87 $objAddress->delete ($objFormParam->getValue('other_deliv_id'));87 $objAddress->deleteAddress($objFormParam->getValue('other_deliv_id')); 88 88 break; 89 89 -
branches/version-2_12_3/data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php
r22206 r22497 136 136 137 137 if ($_GET['other_deliv_id'] != '') { 138 $arrOtherDeliv = $objAddress->get ($_SESSION['other_deliv_id']);138 $arrOtherDeliv = $objAddress->getAddress($_SESSION['other_deliv_id']); 139 139 140 140 //不正アクセス判定 … … 174 174 $sqlval['customer_id'] = $customer_id; 175 175 176 $objAddress-> save($sqlval);176 $objAddress->registAddress($sqlval); 177 177 } 178 178 -
branches/version-2_12_3/data/class/pages/shopping/LC_Page_Shopping_Deliv.php
r22206 r22497 110 110 // 削除 111 111 case 'delete': 112 $objAddress->delete ($arrForm['other_deliv_id']);112 $objAddress->deleteAddress($arrForm['other_deliv_id']); 113 113 break; 114 114 … … 228 228 // 別のお届け先がチェックされている場合 229 229 else { 230 $arrOtherDeliv = $objAddress->get ($other_deliv_id);230 $arrOtherDeliv = $objAddress->getAddress($other_deliv_id); 231 231 if (!$arrOtherDeliv) { 232 232 return false; -
branches/version-2_12_3/data/class/pages/shopping/LC_Page_Shopping_Multiple.php
r22206 r22497 307 307 if ($objCustomer->isLoginSuccess(true)) { 308 308 if ($other_deliv_id != 0) { 309 $otherDeliv = $objAddress->get ($other_deliv_id);309 $otherDeliv = $objAddress->getAddress($other_deliv_id); 310 310 foreach ($otherDeliv as $key => $val) { 311 311 $arrValues[$other_deliv_id]['shipping_' . $key] = $val; -
branches/version-2_12_3/test/class/helper/SC_Helper_Address_Test.php
r22079 r22497 57 57 } 58 58 59 function test Save() {59 function testRegistAddress() { 60 60 // ダミーの住所を登録 61 61 $sqlval = $this->dummy; … … 63 63 // 検証用の住所02 64 64 $sqlval['addr02'] = $create_test = 'create test ' . time(); 65 $this->objAddress-> save($sqlval);65 $this->objAddress->registAddress($sqlval); 66 66 67 67 // 住所02が検証用のものと同じか確認 … … 73 73 // 更新の検証のために住所02を変更 74 74 $sqlval['addr02'] = $update_test = 'update test ' . time(); 75 $this->objAddress-> save($sqlval);75 $this->objAddress->registAddress($sqlval); 76 76 77 77 // 住所02が検証用のものと同じか検証 … … 84 84 * @depends testSave 85 85 */ 86 function testGet () {86 function testGetAddress() { 87 87 // testSave のテストが通っていること前提 88 88 $sqlval = $this->dummy; 89 89 $sqlval['customer_id'] = $this->customer_id; 90 90 $sqlval['addr02'] = 'get test'; 91 $this->objAddress-> save($sqlval);91 $this->objAddress->registAddress($sqlval); 92 92 $this->objQuery->setOrder('other_deliv_id DESC'); 93 93 $other_deliv_id = $this->objQuery->getOne('SELECT other_deliv_id FROM dtb_other_deliv WHERE customer_id = ?', array($this->customer_id)); 94 94 // DBに正しく記録され、取得できているか確認 95 $address = $this->objAddress->get ($other_deliv_id);95 $address = $this->objAddress->getAddress($other_deliv_id); 96 96 $result = TRUE; 97 97 foreach ($sqlval as $key => $value) { … … 111 111 $sqlval['customer_id'] = $this->customer_id; 112 112 $sqlval['addr02'] = 'getList test'; 113 $this->objAddress-> save($sqlval);113 $this->objAddress->registAddress($sqlval); 114 114 $list = $this->objAddress->getList($this->customer_id); 115 115 $found = FALSE; … … 132 132 * @depends testSave 133 133 */ 134 function testDelete () {134 function testDeleteAddress() { 135 135 // testSave のテストが通っていること前提 136 136 $sqlval = $this->dummy; 137 137 $sqlval['customer_id'] = $this->customer_id; 138 138 $sqlval['addr02'] = 'delete test'; 139 $this->objAddress-> save($sqlval);139 $this->objAddress->registAddress($sqlval); 140 140 $this->objQuery->setOrder('other_deliv_id DESC'); 141 141 $other_deliv_id = $this->objQuery->getOne('SELECT other_deliv_id FROM dtb_other_deliv WHERE customer_id = ?', array($this->customer_id)); 142 $this->objAddress->delete ($other_deliv_id);142 $this->objAddress->deleteAddress($other_deliv_id); 143 143 $result = $this->objQuery->getRow('*', 'dtb_other_deliv', 'customer_id = ? and other_deliv_id = ?', array($this->customer_id, $other_deliv_id)); 144 144 $this->assertNull($result);
Note: See TracChangeset
for help on using the changeset viewer.