Ignore:
Timestamp:
2014/06/11 13:42:24 (12 years ago)
Author:
h_yoshimoto
Message:

#2578 version-2_13_2の内容をdevにmerge
r23408,r23412,r23420

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

Legend:

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

    r23294 r23542  
    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} 
  • branches/version-2_13-dev/tests/class/helper/SC_Helper_Address/SC_Helper_Address_getAddressTest.php

    r23294 r23542  
    1313        parent::setUp(); 
    1414        $this->objAddress = new SC_Helper_Address_Ex(); 
    15         $_SESSION['customer']['customer_id'] = 1; // 会員じゃないとテストが落ちる 
    1615    } 
    1716 
     
    2827        $this->setUpAddress(); 
    2928        $other_deliv_id = '999'; 
     29        $customer_id = 1; 
     30        $this->expected = FALSE; 
     31        $this->actual = $this->objAddress->getAddress($other_deliv_id, $customer_id); 
     32 
     33        $this->verify('登録配送先取得'); 
     34    } 
     35     
     36    public function testgetAddressTest_会員IDを設定しない場合_FALSEを返す() 
     37    { 
     38        $this->setUpAddress(); 
     39        $other_deliv_id = '1001'; 
    3040        $this->expected = FALSE; 
    3141        $this->actual = $this->objAddress->getAddress($other_deliv_id); 
     
    3848        $this->setUpAddress(); 
    3949        $other_deliv_id = '1001'; 
     50        $customer_id = 1; 
    4051        $this->expected = array( 
    4152                'other_deliv_id' => '1001', 
     
    6071                'zipcode' => null 
    6172            ); 
    62         $this->actual = $this->objAddress->getAddress($other_deliv_id); 
     73        $this->actual = $this->objAddress->getAddress($other_deliv_id, $customer_id); 
    6374 
    6475        $this->verify('登録配送先取得'); 
Note: See TracChangeset for help on using the changeset viewer.