Ignore:
Timestamp:
2007/07/26 22:05:08 (15 years ago)
Author:
nanasess
Message:

未実装だった関数を実装

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/test/class/db/SC_DB_MasterData_Test.php

    r15134 r15135  
    2222    // {{{ functions 
    2323 
     24    /** 
     25     * SC_DB_MasterData::getMasterData() のテストケース 
     26     */ 
    2427    function testGetMasterData() { 
    2528 
     29        $columns = array("pref_id", "pref_name", "rank"); 
    2630        $masterData = new SC_DB_MasterData_Ex(); 
    27         $actual = $masterData->getMasterData("mtb_pref"); 
     31        $actual = $masterData->getMasterData("mtb_pref", $columns); 
    2832 
    2933        $objQuery = new SC_Query(); 
    30         $expected = $objQuery->select("*", $name); 
     34        $objQuery->setorder($columns[2]); 
     35        $results = $objQuery->select($columns[0] . ", " . $columns[1], "mtb_pref"); 
    3136 
     37        $expected = array(); 
     38        foreach ($results as $result) { 
     39 
     40            $expected[$result[$columns[0]]] = $result[$columns[1]]; 
     41        } 
    3242        $this->assertEquals($expected, $actual); 
    3343    } 
Note: See TracChangeset for help on using the changeset viewer.