当前位置: 首页>>代码示例>>PHP>>正文


PHP TestSuite::getBaseTestCase方法代码示例

本文整理汇总了PHP中TestSuite::getBaseTestCase方法的典型用法代码示例。如果您正苦于以下问题:PHP TestSuite::getBaseTestCase方法的具体用法?PHP TestSuite::getBaseTestCase怎么用?PHP TestSuite::getBaseTestCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestSuite的用法示例。


在下文中一共展示了TestSuite::getBaseTestCase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: add

 /**
  *    Adds a test into the suite by instance or class. The class will
  *    be instantiated if it's a test suite.
  * @param SimpleTestCase $test_case Suite or individual test
  *                                      case implementing the
  *                                      runnable test interface.
  */
 public function add($test_case)
 {
     if (!is_string($test_case)) {
         $this->test_cases[] = $test_case;
     } elseif (TestSuite::getBaseTestCase($test_case) == 'testsuite') {
         $this->test_cases[] = new $test_case();
     } else {
         $this->test_cases[] = $test_case;
     }
 }
开发者ID:kitware,项目名称:cdash,代码行数:17,代码来源:test_case.php

示例2: add

 /**
  *    Adds a test into the suite by instance or class. The class will
  *    be instantiated if it's a test suite.
  *    @param SimpleTestCase $test_case  Suite or individual test
  *                                      case implementing the
  *                                      runnable test interface.
  *    @access public
  */
 function add(&$test_case) {
     if (! is_string($test_case)) {
         $this->_test_cases[] = &$test_case;
     } elseif (TestSuite::getBaseTestCase($class) == 'testsuite') {
         $this->_test_cases[] = new $class();
     } else {
         $this->_test_cases[] = $class;
     }
 }
开发者ID:nuckey,项目名称:moodle,代码行数:17,代码来源:test_case.php

示例3: selectRunnableTests

 /**
  *    Calculates the incoming test cases. Skips abstract
  *    and ignored classes.
  *
  *    @param array $candidates   Candidate classes.
  *
  *    @return array              New classes which are test
  *                               cases that shouldn't be ignored.
  */
 public function selectRunnableTests($candidates)
 {
     $classes = array();
     foreach ($candidates as $class) {
         if (TestSuite::getBaseTestCase($class)) {
             $reflection = new SimpleReflection($class);
             if ($reflection->isAbstract()) {
                 SimpleTest::ignore($class);
             } else {
                 $classes[] = $class;
             }
         }
     }
     return $classes;
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:24,代码来源:test_case.php


注:本文中的TestSuite::getBaseTestCase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。