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

未実装だった関数を実装

Location:
branches/feature-module-update/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/test/TestSuite.php

    r15116 r15135  
    1010require_once("../html/require.php"); 
    1111require_once("class/page/LC_Page_Test.php"); 
     12require_once("class/db/SC_DB_DBFactory_Test.php"); 
     13require_once("class/db/SC_DB_MasterData_Test.php"); 
    1214require_once("PHPUnit.php"); 
    1315 
    14 $suite = new PHPUnit_TestSuite("LC_Page_Test"); 
    15 $result = PHPUnit::run($suite); 
     16$suites = array(); 
     17$suites[0] = new PHPUnit_TestSuite("LC_Page_Test"); 
     18$suites[1] = new PHPUnit_TestSuite("SC_DB_DBFactory_Test"); 
     19$suites[2] = new PHPUnit_TestSuite("SC_DB_MasterData_Test"); 
    1620 
    17 print $result->toString(); 
     21foreach ($suites as $suite) { 
     22    $result = PHPUnit::run($suite); 
     23    print $result->toString(); 
     24} 
    1825?> 
  • 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.