Ignore:
Timestamp:
2014/05/12 13:36:22 (10 years ago)
Author:
m_uehara
Message:

#2541 SC_Helper_Addressの処理の改善

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13_2/tests/class/helper/SC_Helper_Address/SC_Helper_Address_deleteAddressTest.php

    r23294 r23408  
    1313        parent::setUp(); 
    1414        $this->objAddress = new SC_Helper_Address_Ex(); 
    15         $_SESSION['customer']['customer_id'] = 1; // 会員じゃないとテストが落ちる 
    1615    } 
    1716 
     
    2726        $this->setUpAddress(); 
    2827        $other_deliv_id = '1000'; 
     28        $customer_id = 1; 
    2929        $this->expected = NULL; 
    30         $this->objAddress->deleteAddress($other_deliv_id); 
     30        $this->objAddress->deleteAddress($other_deliv_id, $customer_id); 
    3131        $objQuery   =& SC_Query_Ex::getSingletonInstance(); 
    3232        $select = '*'; 
    3333        $from = 'dtb_other_deliv'; 
    34         $where = 'other_deliv_id = ?'; 
    35         $whereVal = array($other_deliv_id); 
     34        $where = 'other_deliv_id = ? AND customer_id = ?'; 
     35        $whereVal = array($other_deliv_id, $customer_id); 
    3636        $this->actual = $objQuery->getRow($select, $from, $where, $whereVal); 
    3737 
    3838        $this->verify('登録配送先削除'); 
    3939    } 
     40 
     41    public function testdeleteAddressTest_会員IDを設定しない場合_FALSEを返す() 
     42    { 
     43        $this->setUpAddress(); 
     44        $other_deliv_id = '1000'; 
     45        $this->expected = FALSE; 
     46        $this->actual = $this->objAddress->deleteAddress($other_deliv_id); 
     47 
     48        $this->verify('登録配送先削除'); 
     49    } 
    4050} 
Note: See TracChangeset for help on using the changeset viewer.