Beispiel #1
0
 /**
  * 単体テストを実行する
  * @param string $class
  * @param string $method
  * @param string $block_name
  */
 function test($class, $method = null, $block_name = null)
 {
     Test::verify($class, $method, $block_name);
     print new Test();
     Test::clear();
 }
Beispiel #2
0
 /**
  * testを実行する
  *  -test クラス名
  *  option:
  *  	-m メソッド名
  *  	-m メソッド名 -b ブロック名
  *  	-fail failを表示する
  *  	-succes succesを表示する
  *  	-none noneを表示する 
  * @summary execute test
  */
 public static function __setup_test__(Request $req, $value)
 {
     $level = ($req->is_vars('fail') ? Test::FAIL : 0) | ($req->is_vars('success') ? Test::SUCCESS : 0) | ($req->is_vars('none') ? Test::NONE : 0);
     if ($level === 0) {
         $level = Test::FAIL | Test::SUCCESS | Test::NONE;
     }
     Test::exec_type($level | Test::COUNT);
     if (empty($value)) {
         Test::verifies();
     } else {
         Test::verify($value, $req->in_vars("m"), $req->in_vars("b"));
     }
     Test::flush();
 }