Ignore:
Timestamp:
2013/05/02 18:11:36 (11 years ago)
Author:
h_yoshimoto
Message:

#2236 2.12.3リリース以降の2.12-devへのコミット差し戻し

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/test/class/SC_DbConn_Test.php

    r22567 r22796  
    3232 * @version $Id$ 
    3333 */ 
    34 class SC_DbConn_Test extends PHPUnit_Framework_TestCase  
    35 { 
     34class SC_DbConn_Test extends PHPUnit_Framework_TestCase { 
    3635 
    3736    /** SC_DbConn インスタンス */ 
     
    4140    var $actual; 
    4241 
    43     function setUp() 
    44     { 
     42    function setUp() { 
    4543        $this->objDbConn = new SC_DbConn(); 
    4644        $this->objDbConn->query('BEGIN'); 
    4745    } 
    4846 
    49     function tearDown() 
    50     { 
     47    function tearDown() { 
    5148        $this->objDbConn->query('ROLLBACK'); 
    5249        $this->objDbConn = null; 
    5350    } 
    5451 
    55     function verify() 
    56     { 
     52    function verify() { 
    5753        $this->assertEquals($this->expected, $this->actual); 
    5854    } 
     
    6157     * インスタンスを取得するテストケース. 
    6258     */ 
    63     function testGetInstance() 
    64     { 
     59    function testGetInstance() { 
    6560        $this->expected = true; 
    6661        $this->actual = is_object($this->objDbConn); 
     
    7267     * SC_DbConn:query() を使用して, CREATE TABLE を実行するテストケース. 
    7368     */ 
    74     function testCreateTable() 
    75     { 
     69    function testCreateTable() { 
    7670        $result = $this->createTestTable(); 
    7771 
     
    8579     * SC_DbConn::getAll() のテストケース. 
    8680     */ 
    87     function testGetAll() 
    88     { 
     81    function testGetAll() { 
    8982        $this->createTestTable(); 
    9083        $result = $this->setTestData(1, '2', 'f'); 
     
    10396     */ 
    10497    /* 
    105     function testGetAllIsError() 
    106     { 
     98    function testGetAllIsError() { 
    10799 
    108100        // SC_DbConn::getAll() は接続エラーが発生すると 0 を返す 
     
    119111     * SC_DbConn::getOne() のテストケース. 
    120112     */ 
    121     function testGetOne() 
    122     { 
     113    function testGetOne() { 
    123114        $this->createTestTable(); 
    124115        $this->setTestData(1, '2', 'f'); 
     
    136127     */ 
    137128    /* 
    138     function testGetOneIsError() 
    139     { 
     129    function testGetOneIsError() { 
    140130        $this->createTestTable(); 
    141131        $this->setTestData(1, '2', 'f'); 
     
    153143     * SC_DbConn::getRow() のテストケース. 
    154144     */ 
    155     function testGetRow() 
    156     { 
     145    function testGetRow() { 
    157146        $this->createTestTable(); 
    158147        $this->setTestData(1, '1', 'f'); 
     
    168157     * SC_DbConn::getCol() のテストケース. 
    169158     */ 
    170     function testGetCol() 
    171     { 
     159    function testGetCol() { 
    172160        $this->createTestTable(); 
    173161        $this->setTestData(1, '1', 'f'); 
     
    186174     */ 
    187175    /* 
    188     function testAutoExecuteOfInsert() 
    189     { 
     176    function testAutoExecuteOfInsert() { 
    190177        $this->createTestTable(); 
    191178        $result = $this->setTestData(1, '2', 'f'); 
     
    205192     */ 
    206193    /* 
    207     function testAutoExecuteOfUpdate() 
    208     { 
     194    function testAutoExecuteOfUpdate() { 
    209195        $this->createTestTable(); 
    210196        $this->setTestData(1, '2', 'f'); 
     
    228214     * SC_DbConn::query() で INSERT を実行するテストケース. 
    229215     */ 
    230     function testQuery1() 
    231     { 
     216    function testQuery1() { 
    232217        $this->createTestTable(); 
    233218        $sql = "INSERT INTO test_table VALUES (?, ?, ?, ?)"; 
     
    249234     * SC_DbConn::query() で UPDATE を実行するテストケース. 
    250235     */ 
    251     function testQuery2() 
    252     { 
     236    function testQuery2() { 
    253237        $this->createTestTable(); 
    254238        $this->setTestData(1, '2', 'f'); 
     
    273257     * SC_DbConn::prepare() は未使用 
    274258     */ 
    275     function testPrepare() 
    276     { 
     259    function testPrepare() { 
    277260    } 
    278261 
     
    280263     * SC_DbConn::execute() は未使用 
    281264     */ 
    282     function testExecute() 
    283     { 
     265    function testExecute() { 
    284266    } 
    285267 
     
    287269     * SC_DbConn::reset() は未使用 
    288270     */ 
    289     function testReset() 
    290     { 
    291     } 
    292  
    293     function createTestTable() 
    294     { 
     271    function testReset() { 
     272    } 
     273 
     274    function createTestTable() { 
    295275        $sql = "CREATE TABLE test_table (" 
    296276            . "id SERIAL PRIMARY KEY," 
     
    302282    } 
    303283 
    304     function setTestData($column1, $column2, $column3) 
    305     { 
     284    function setTestData($column1, $column2, $column3) { 
    306285        $fields_values = array($column1, $column2, $column3); 
    307286        $sql = "INSERT INTO test_table (column1, column2, column3) VALUES (?, ?, ?)"; 
Note: See TracChangeset for help on using the changeset viewer.