Changeset 23539


Ignore:
Timestamp:
2014/06/11 10:20:35 (10 years ago)
Author:
shutta
Message:

#2448 typo修正・ソース整形・ソースコメントの改善 for 2.13.3
インデントの調整。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/tests/class/Common_TestCase.php

    r23348 r23539  
    1919{ 
    2020 
    21   /** SC_Query インスタンス */ 
    22   protected $objQuery; 
     21    /** SC_Query インスタンス */ 
     22    protected $objQuery; 
    2323 
    24   /** 期待値 */ 
    25   protected $expected; 
    26   /** 実際の値 */ 
    27   protected $actual; 
     24    /** 期待値 */ 
     25    protected $expected; 
     26    /** 実際の値 */ 
     27    protected $actual; 
    2828 
    29   protected function setUp() 
    30   { 
    31     $this->objQuery = SC_Query_Ex::getSingletonInstance('', true); 
    32     $this->objQuery->begin(); 
    33   } 
     29    protected function setUp() 
     30    { 
     31      $this->objQuery = SC_Query_Ex::getSingletonInstance('', true); 
     32      $this->objQuery->begin(); 
     33    } 
    3434 
    35   protected function tearDown() 
    36   { 
    37     $this->objQuery->rollback(); 
    38     $this->objQuery = null; 
    39   } 
     35    protected function tearDown() 
     36    { 
     37        $this->objQuery->rollback(); 
     38        $this->objQuery = null; 
     39    } 
    4040 
    41   /** 
    42    * 各テストfunctionの末尾で呼び出し、期待値と実際の値の比較を行います。 
    43    * 呼び出す前に、$expectedに期待値を、$actualに実際の値を導入してください。 
    44    */ 
    45   protected function verify($message = null) 
    46   { 
    47     $this->assertEquals($this->expected, $this->actual, $message); 
    48   } 
     41    /** 
     42     * 各テストfunctionの末尾で呼び出し、期待値と実際の値の比較を行います。 
     43     * 呼び出す前に、$expectedに期待値を、$actualに実際の値を導入してください。 
     44     */ 
     45    protected function verify($message = null) 
     46    { 
     47        $this->assertEquals($this->expected, $this->actual, $message); 
     48    } 
    4949 
    50   ////////////////////////////////////////////////////////////////// 
    51   // 以下はテスト用のユーティリティを使うためのサンプルです。 
    52   // 実際に動作させる場合にはコメントアウトを外して下さい。 
     50    ////////////////////////////////////////////////////////////////// 
     51    // 以下はテスト用のユーティリティを使うためのサンプルです。 
     52    // 実際に動作させる場合にはコメントアウトを外して下さい。 
    5353 
    54   /** 
    55    * actionExit()呼び出しを書き換えてexit()させない例です。 
    56    */ 
    57   /** 
    58   public function testExit() 
    59   { 
    60     $resp = new SC_Response_Ex(); 
    61     $resp->actionExit(); 
     54    /** 
     55     * actionExit()呼び出しを書き換えてexit()させない例です。 
     56     */ 
     57    /** 
     58    public function testExit() 
     59    { 
     60        $resp = new SC_Response_Ex(); 
     61        $resp->actionExit(); 
    6262 
    63     $this->expected = TRUE; 
    64     $this->actual = $resp->isExited(); 
    65     $this->verify('exitしたかどうか'); 
    66   } 
    67   */ 
     63        $this->expected = TRUE; 
     64        $this->actual = $resp->isExited(); 
     65        $this->verify('exitしたかどうか'); 
     66    } 
     67    */ 
    6868 
    69   /** 
    70    * 端末種別をテストケースから自由に設定する例です。 
    71    */ 
    72   /** 
    73   public function testDeviceType() 
    74   { 
    75     $this->expected = array(DEVICE_TYPE_MOBILE, DEVICE_TYPE_SMARTPHONE); 
    76     $this->actual = array(); 
     69    /** 
     70     * 端末種別をテストケースから自由に設定する例です。 
     71     */ 
     72    /** 
     73    public function testDeviceType() 
     74    { 
     75        $this->expected = array(DEVICE_TYPE_MOBILE, DEVICE_TYPE_SMARTPHONE); 
     76        $this->actual = array(); 
    7777 
    78     // 端末種別を設定 
    79     User_Utils::setDeviceType(DEVICE_TYPE_MOBILE); 
    80     $this->actual[0] = SC_Display_Ex::detectDevice(); 
    81     User_Utils::setDeviceType(DEVICE_TYPE_SMARTPHONE); 
    82     $this->actual[1] = SC_Display_Ex::detectDevice(); 
     78        // 端末種別を設定 
     79        User_Utils::setDeviceType(DEVICE_TYPE_MOBILE); 
     80        $this->actual[0] = SC_Display_Ex::detectDevice(); 
     81        User_Utils::setDeviceType(DEVICE_TYPE_SMARTPHONE); 
     82        $this->actual[1] = SC_Display_Ex::detectDevice(); 
    8383 
    84     $this->verify('端末種別'); 
    85   } 
    86   */ 
     84        $this->verify('端末種別'); 
     85    } 
     86    */ 
    8787 
    88   /** 
    89    * ログイン状態をテストケースから自由に切り替える例です。 
    90    */ 
    91   /** 
    92   public function testLoginState() 
    93   { 
    94     $this->expected = array(FALSE, TRUE); 
    95     $this->actual = array(); 
     88    /** 
     89     * ログイン状態をテストケースから自由に切り替える例です。 
     90     */ 
     91    /** 
     92    public function testLoginState() 
     93    { 
     94        $this->expected = array(FALSE, TRUE); 
     95        $this->actual = array(); 
    9696 
    97     $objCustomer = new SC_Customer_Ex(); 
    98     User_Utils::setLoginState(FALSE); 
    99     $this->actual[0] = $objCustomer->isLoginSuccess(); 
    100     User_Utils::setLoginState(TRUE, null, $this->objQuery); 
    101     $this->actual[1] = $objCustomer->isLoginSuccess(); 
     97        $objCustomer = new SC_Customer_Ex(); 
     98        User_Utils::setLoginState(FALSE); 
     99        $this->actual[0] = $objCustomer->isLoginSuccess(); 
     100        User_Utils::setLoginState(TRUE, null, $this->objQuery); 
     101        $this->actual[1] = $objCustomer->isLoginSuccess(); 
    102102 
    103     $this->verify('ログイン状態'); 
    104   } 
    105   */ 
     103        $this->verify('ログイン状態'); 
     104    } 
     105    */ 
    106106} 
    107107 
Note: See TracChangeset for help on using the changeset viewer.