Ignore:
Timestamp:
2011/03/03 12:02:18 (11 years ago)
Author:
nanasess
bzr:base-revision:
ohkouchi@loop-az.jp-20110302111225-7nt684mmays9jmmw
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/class/pages/shopping/LC_Page_Shopping_Confirm.php 15223@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fshopping%2FLC_Page_Shopping_Confirm.php
data/class/pages/shopping/LC_Page_Shopping_LoadPaymentModule.php lc_page_shopping_loa-20101025071457-rpmc2g2y1ik9lyow-1
data/class/pages/upgrade/helper/LC_Upgrade_Helper_Json.php 16839@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fupgrade%2Fhelper%2FLC_Upgrade_Helper_Json.php
test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php lc_page_shopping_loa-20101025071501-16934ygv2y12gz92-1
bzr:mapping-version:
v4
bzr:merge:

ohkouchi@loop-az.jp-20110303030004-43u2fhzy6y0i15nf
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20110303030214-5ztlfgyzhqa3cncl
bzr:revno:
3194
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/class/pages/shopping/LC_Page_Shopping_Confirm.php ohkouchi@loop-az.jp-20110303030004-43u2fhzy6y0i15nf
data/class/pages/shopping/LC_Page_Shopping_LoadPaymentModule.php ohkouchi@loop-az.jp-20110303030004-43u2fhzy6y0i15nf
test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php ohkouchi@loop-az.jp-20110303030004-43u2fhzy6y0i15nf
bzr:timestamp:
2011-03-03 12:02:14.236999989 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2011-03-03T03:02:14.237000Z
Message:

#842(決済モジュールから load_payment_module へ戻った場合の挙動の改善)

  • 受注フローの変更に伴い, LC_Page_Shopping_LoadPaymentModule.php を修正
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php

    r20116 r20467  
    4646    } 
    4747 
    48     function testGetPaymentIdBySession() { 
    49         $_SESSION['payment_id'] = 1; 
    50         $_GET['payment_id'] = 2; 
    51         $_POST['payment_id'] = 3; 
     48    function testGetOrderIdBySession() { 
     49        $_SESSION['order_id'] = 1; 
     50        $_GET['order_id'] = 2; 
     51        $_POST['order_id'] = 3; 
    5252 
    53         $this->expected = $_SESSION['payment_id']; 
    54         $this->actual = $this->objPage->getPaymentId(); 
     53        $this->expected = $_SESSION['order_id']; 
     54        $this->actual = $this->objPage->getOrderId(); 
    5555 
    5656        $this->verify(); 
    5757    } 
    5858 
    59     function testGetPaymentIdByPOST() { 
    60         $_GET['payment_id'] = 1; 
    61         $_POST['payment_id'] = 1; 
     59    function testGetOrderIdByPOST() { 
     60        $_GET['order_id'] = 1; 
     61        $_POST['order_id'] = 1; 
    6262 
    63         $this->expected = $_POST['payment_id']; 
    64         $this->actual = $this->objPage->getPaymentId(); 
     63        $this->expected = $_POST['order_id']; 
     64        $this->actual = $this->objPage->getOrderId(); 
    6565 
    6666        $this->verify(); 
    6767    } 
    6868 
    69     function testGetPaymentIdByGET() { 
    70         $_GET['payment_id'] = 2; 
     69    function testGetOrderIdByGET() { 
     70        $_GET['order_id'] = 2; 
    7171 
    72         $this->expected = $_GET['payment_id']; 
    73         $this->actual = $this->objPage->getPaymentId(); 
     72        $this->expected = $_GET['order_id']; 
     73        $this->actual = $this->objPage->getOrderId(); 
    7474 
    7575        $this->verify(); 
    7676    } 
    7777 
    78     function testGetPaymentIdIsNull() { 
    79         $this->assertFalse($this->objPage->getPaymentId()); 
     78    function testGetOrderIdIsNull() { 
     79        $this->assertFalse($this->objPage->getOrderId()); 
    8080    } 
    8181 
    8282    function testGetModulePath() { 
     83        $order_id = 10000; 
    8384        $payment_id = 10000; 
    8485        $module_path = __FILE__; 
    85         $this->setPayment($payment_id, $module_path); 
     86        $this->setPayment($order_id, $payment_id, $module_path); 
    8687 
    8788        $this->expected = __FILE__; 
    88         $this->actual = $this->objPage->getModulePath($payment_id); 
     89        $this->actual = $this->objPage->getModulePath($order_id); 
    8990 
    9091        $this->verify(); 
     
    9293 
    9394    function testGetModulePathIsFailure() { 
     95        $order_id = 10000; 
    9496        $payment_id = 10000; 
    9597        $module_path = "aaa"; 
    96         $this->setPayment($payment_id, $module_path); 
     98        $this->setPayment($order_id, $payment_id, $module_path); 
    9799 
    98         $this->actual = $this->objPage->getModulePath($payment_id); 
     100        $this->actual = $this->objPage->getModulePath($order_id); 
    99101 
    100102        $this->assertFalse($this->actual); 
     
    106108    } 
    107109 
    108     function setPayment($payment_id, $module_path) { 
    109         $this->objQuery->insert("dtb_payment", array('payment_id' => $payment_id, 
     110    function setPayment($order_id, $payment_id, $module_path) { 
     111        $this->objQuery->insert('dtb_order', array('order_id' => $order_id, 
     112                                                   'customer_id' => (int) 0, 
     113                                                   'payment_id' => $payment_id, 
     114                                                   'create_date' => 'now()', 
     115                                                   'update_date' => 'now()')); 
     116 
     117        $this->objQuery->insert("dtb_payment", array('payment_id' => $order_id, 
    110118                                                     'module_path' => $module_path, 
    111                                                      'creator_id' => 1)); 
     119                                                     'creator_id' => 1, 
     120                                                     'create_date' => 'now()', 
     121                                                     'update_date' => 'now()')); 
    112122    } 
    113123} 
Note: See TracChangeset for help on using the changeset viewer.