Source for file Ethna_View_UnitTest.php

Documentation is available at Ethna_View_UnitTest.php

  1. <?php
  2. /**
  3.  *  Ethna_View_UnitTest.php
  4.  *
  5.  *  @author     Takuya Ookubo <sfio@sakura.ai.to>
  6.  *  @license    http://www.opensource.org/licenses/bsd-license.php The BSD License
  7.  *  @package    Ethna
  8.  *  @version    $Id: Ethna_View_UnitTest.php 432 2006-11-28 04:52:54Z ichii386 $
  9.  */
  10.  
  11. /**
  12.  *  __ethna_unittest__ビューの実装
  13.  *
  14.  *  @author     Takuya Ookubo <sfio@sakura.ai.to>
  15.  *  @access     public
  16.  *  @package    Ethna
  17.  */
  18. {
  19.     /**
  20.      *  遷移前処理
  21.      *
  22.      *  @access public
  23.      */
  24.     function preforward()
  25.     {
  26.         // タイムアウトしないように変更
  27.         $max_execution_time ini_get('max_execution_time');
  28.         set_time_limit(0);
  29.  
  30.         if (!headers_sent()) {
  31.             // キャッシュしない
  32.             header("Expires: Thu, 01 Jan 1970 00:00:00 GMT");
  33.             header("Last-Modified: " gmdate("D, d M Y H:i:s \G\M\T"));
  34.             header("Cache-Control: no-store, no-cache, must-revalidate");
  35.             header("Cache-Control: post-check=0, pre-check=0"false);
  36.             header("Pragma: no-cache");
  37.         }
  38.  
  39.         $ctl =Ethna_Controller::getInstance();
  40.  
  41.         // cores
  42.         $this->af->setApp('app_id'$ctl->getAppId());
  43.         $this->af->setApp('ethna_version'ETHNA_VERSION);
  44.  
  45.         // include
  46.         $file sprintf("%s/%s_UnitTestManager.php",
  47.             $ctl->getDirectory('app'),
  48.             $ctl->getAppId());
  49.         include_once $file;
  50.  
  51.         // run
  52.         $r sprintf("%s_UnitTestManager"$ctl->getAppId());
  53.         $ut =new $r($this->backend);
  54.         list($report$result$ut->run();
  55.         
  56.         // result
  57.         $this->af->setApp('report'$report);
  58.         $this->af->setApp('result'$result);
  59.  
  60.         // タイムアウトを元に戻す
  61.         set_time_limit($max_execution_time);
  62.     }
  63. }
  64. ?>

Documentation generated on Thu, 08 May 2008 00:15:41 +0900 by phpDocumentor 1.4.2