Changeset 21362


Ignore:
Timestamp:
2011/12/06 15:48:11 (9 years ago)
Author:
habu
Message:

#1569(テスト用の会員データ作成スクリプト) - ログ出力等を追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/test/createEcCubeCustomerData-v25.php

    • Property svn:eol-style set to LF
    • Property svn:keywords set to Id
    • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
    r21360 r21362  
    2323 * 
    2424 * @auther Kentaro Habu 
    25  * @version $Id: createEcCubeCustomerData-v25.php $ 
     25 * @version $Id$ 
    2626 */ 
    2727 
     
    6666 
    6767// 会員生成 
    68 $objData->createProducts(); 
     68print("creating Customer Data(for Test)...\n"); 
     69$objData->createCustomers(); 
    6970 
    7071//$objData->objQuery->rollback(); 
     
    7879print("create customer data DONE!\n"); 
    7980printf("elapsed time: %f sec\n", $end - $start); 
    80  
     81lfPrintLog(sprintf("elapsed time: %f sec\n", $end - $start)); 
     82exit; 
    8183 
    8284// }}} 
     
    103105     * @return void 
    104106     */ 
    105     function createProducts() { 
    106  
    107         print("creating Customer Data(for Test)...\n"); 
     107    function createCustomers() { 
     108        lfPrintLog("createCustomers START.(" . CUSTOMERS_VOLUME . " data)"); 
    108109        for ($i = 0; $i < CUSTOMERS_VOLUME; $i++) { 
     110            lfPrintLog("----------"); 
     111            lfPrintLog("creating customer data count:[" . ($i+1) . "] start."); 
    109112             
    110113            $sqlval['name01'] = "検証"; 
     
    114117            $sqlval['zip01'] = "101"; 
    115118            $sqlval['zip02'] = "0051"; 
    116             $sqlval['pref'] = "13"; 
     119            $sqlval['pref'] = "13"; // 13:東京都 
    117120            $sqlval['addr01'] = "千代田区神田神保町"; 
    118121            $sqlval['addr02'] = "1-3-5"; 
     
    147150 
    148151            print("*"); 
     152            lfPrintLog("creating customer data count:[" . ($i+1) . "] end."); 
    149153        } 
    150154        print("\n"); 
     155        lfPrintLog("createCustomers DONE.(" . CUSTOMERS_VOLUME . " data created)"); 
    151156    } 
    152157 
     158} 
     159 
     160/** テスト用スクリプトのログ出力関数 */ 
     161function lfPrintLog($mess) { 
     162    $path = DATA_REALDIR . "logs/" .  basename(__FILE__, '.php') . ".log"; 
     163    GC_Utils::gfPrintLog($mess, $path); 
    153164} 
    154165 
Note: See TracChangeset for help on using the changeset viewer.