Changeset 22532 for branches


Ignore:
Timestamp:
2013/02/13 13:28:13 (11 years ago)
Author:
undertree
Message:

#2040 (SC_Utils_Ex::sfGetProductClassIdで、$classcategory_id1 と $classcategory_id2 が使用されていない。)

・テストケースの更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfGetProductClassIdTest.php

    r22206 r22532  
    4545 
    4646  ///////////////////////////////////////// 
    47   public function testSfGetProductClassId_存在するIDを指定した場合_対応する製品クラスが取得できる() { 
     47  public function testSfGetProductClassId_存在する製品IDのみを指定した場合_カテゴリ0の対応する製品クラスが取得できる() { 
    4848     
    49     $this->expected = '1001'; 
    50     $this->actual = SC_Utils::sfGetProductClassId('1001'); 
     49    $this->expected = '2001'; 
     50    $this->actual = SC_Utils::sfGetProductClassId('2001'); 
    5151 
    5252    $this->verify('取得した製品クラス'); 
    5353  } 
    5454 
    55   public function testSfGetProductClassId_存在しないIDを指定した場合_nullが返る() { 
     55  public function testSfGetProductClassId_存在する製品IDのみを指定してカテゴリ0の製品クラスが存在しなければ_nullが返る() { 
     56     
     57    $this->expected = null; 
     58    $this->actual = SC_Utils::sfGetProductClassId('1001'); 
     59 
     60    $this->verify('取得結果が空'); 
     61  } 
     62 
     63  public function testSfGetProductClassId_存在する製品IDとカテゴリIDを指定した場合_対応する製品クラスが取得できる() { 
     64     
     65    $this->expected = '1002'; 
     66    $this->actual = SC_Utils::sfGetProductClassId('1001', '2'); 
     67 
     68    $this->verify('取得した製品クラス'); 
     69  } 
     70 
     71  public function testSfGetProductClassId_存在する製品IDと存在しないカテゴリIDを指定した場合_nullが返る() { 
     72     
     73    $this->expected = null; 
     74    $this->actual = SC_Utils::sfGetProductClassId('1001', '999'); 
     75 
     76    $this->verify('取得結果が空'); 
     77  } 
     78 
     79  public function testSfGetProductClassId_存在しない製品IDを指定した場合_nullが返る() { 
    5680    $this->expected = null; 
    5781    $this->actual = SC_Utils::sfGetProductClassId('9999'); 
     
    77101        'creator_id' => '1', 
    78102        'update_date' => 'CURRENT_TIMESTAMP' 
    79       ) 
    80       /** 同じproduct_idが2つあるケースは現状failするのでいったんコメントアウト 
     103      ), 
    81104      array( 
    82105        'product_class_id' => '1002', 
     
    87110        'update_date' => 'CURRENT_TIMESTAMP' 
    88111      ) 
    89       */ 
    90112    ); 
    91113 
Note: See TracChangeset for help on using the changeset viewer.