Ignore:
Timestamp:
2013/02/18 19:09:54 (11 years ago)
Author:
shutta
Message:

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.12.4)
Zend Framework PHP 標準コーディング規約のコーディングスタイルへ準拠。
classおよびfunctionの開始波括弧「{」のスタイルを修正。

File:
1 edited

Legend:

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

    r22206 r22567  
    3232 * @version $Id$ 
    3333 */ 
    34 class SC_DbConn_Test extends PHPUnit_Framework_TestCase { 
     34class SC_DbConn_Test extends PHPUnit_Framework_TestCase  
     35{ 
    3536 
    3637    /** SC_DbConn インスタンス */ 
     
    4041    var $actual; 
    4142 
    42     function setUp() { 
     43    function setUp() 
     44    { 
    4345        $this->objDbConn = new SC_DbConn(); 
    4446        $this->objDbConn->query('BEGIN'); 
    4547    } 
    4648 
    47     function tearDown() { 
     49    function tearDown() 
     50    { 
    4851        $this->objDbConn->query('ROLLBACK'); 
    4952        $this->objDbConn = null; 
    5053    } 
    5154 
    52     function verify() { 
     55    function verify() 
     56    { 
    5357        $this->assertEquals($this->expected, $this->actual); 
    5458    } 
     
    5761     * インスタンスを取得するテストケース. 
    5862     */ 
    59     function testGetInstance() { 
     63    function testGetInstance() 
     64    { 
    6065        $this->expected = true; 
    6166        $this->actual = is_object($this->objDbConn); 
     
    6772     * SC_DbConn:query() を使用して, CREATE TABLE を実行するテストケース. 
    6873     */ 
    69     function testCreateTable() { 
     74    function testCreateTable() 
     75    { 
    7076        $result = $this->createTestTable(); 
    7177 
     
    7985     * SC_DbConn::getAll() のテストケース. 
    8086     */ 
    81     function testGetAll() { 
     87    function testGetAll() 
     88    { 
    8289        $this->createTestTable(); 
    8390        $result = $this->setTestData(1, '2', 'f'); 
     
    96103     */ 
    97104    /* 
    98     function testGetAllIsError() { 
     105    function testGetAllIsError() 
     106    { 
    99107 
    100108        // SC_DbConn::getAll() は接続エラーが発生すると 0 を返す 
     
    111119     * SC_DbConn::getOne() のテストケース. 
    112120     */ 
    113     function testGetOne() { 
     121    function testGetOne() 
     122    { 
    114123        $this->createTestTable(); 
    115124        $this->setTestData(1, '2', 'f'); 
     
    127136     */ 
    128137    /* 
    129     function testGetOneIsError() { 
     138    function testGetOneIsError() 
     139    { 
    130140        $this->createTestTable(); 
    131141        $this->setTestData(1, '2', 'f'); 
     
    143153     * SC_DbConn::getRow() のテストケース. 
    144154     */ 
    145     function testGetRow() { 
     155    function testGetRow() 
     156    { 
    146157        $this->createTestTable(); 
    147158        $this->setTestData(1, '1', 'f'); 
     
    157168     * SC_DbConn::getCol() のテストケース. 
    158169     */ 
    159     function testGetCol() { 
     170    function testGetCol() 
     171    { 
    160172        $this->createTestTable(); 
    161173        $this->setTestData(1, '1', 'f'); 
     
    174186     */ 
    175187    /* 
    176     function testAutoExecuteOfInsert() { 
     188    function testAutoExecuteOfInsert() 
     189    { 
    177190        $this->createTestTable(); 
    178191        $result = $this->setTestData(1, '2', 'f'); 
     
    192205     */ 
    193206    /* 
    194     function testAutoExecuteOfUpdate() { 
     207    function testAutoExecuteOfUpdate() 
     208    { 
    195209        $this->createTestTable(); 
    196210        $this->setTestData(1, '2', 'f'); 
     
    214228     * SC_DbConn::query() で INSERT を実行するテストケース. 
    215229     */ 
    216     function testQuery1() { 
     230    function testQuery1() 
     231    { 
    217232        $this->createTestTable(); 
    218233        $sql = "INSERT INTO test_table VALUES (?, ?, ?, ?)"; 
     
    234249     * SC_DbConn::query() で UPDATE を実行するテストケース. 
    235250     */ 
    236     function testQuery2() { 
     251    function testQuery2() 
     252    { 
    237253        $this->createTestTable(); 
    238254        $this->setTestData(1, '2', 'f'); 
     
    257273     * SC_DbConn::prepare() は未使用 
    258274     */ 
    259     function testPrepare() { 
     275    function testPrepare() 
     276    { 
    260277    } 
    261278 
     
    263280     * SC_DbConn::execute() は未使用 
    264281     */ 
    265     function testExecute() { 
     282    function testExecute() 
     283    { 
    266284    } 
    267285 
     
    269287     * SC_DbConn::reset() は未使用 
    270288     */ 
    271     function testReset() { 
    272     } 
    273  
    274     function createTestTable() { 
     289    function testReset() 
     290    { 
     291    } 
     292 
     293    function createTestTable() 
     294    { 
    275295        $sql = "CREATE TABLE test_table (" 
    276296            . "id SERIAL PRIMARY KEY," 
     
    282302    } 
    283303 
    284     function setTestData($column1, $column2, $column3) { 
     304    function setTestData($column1, $column2, $column3) 
     305    { 
    285306        $fields_values = array($column1, $column2, $column3); 
    286307        $sql = "INSERT INTO test_table (column1, column2, column3) VALUES (?, ?, ?)"; 
Note: See TracChangeset for help on using the changeset viewer.