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


PHP UnitTestCase::getTests方法代码示例

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


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

示例1: getTests

 /**
  * Modified testing algorithm that allows a single test method to be
  * prefixed with __only in order to make it the only one run.
  */
 function getTests()
 {
     // __onlytest makes only one test get triggered
     foreach (get_class_methods(get_class($this)) as $method) {
         if (strtolower(substr($method, 0, 10)) == '__onlytest') {
             return array($method);
         }
     }
     return parent::getTests();
 }
开发者ID:nicolasembleton,项目名称:CSSTidy,代码行数:14,代码来源:class.csstidy_harness.php

示例2: getTests

 public function getTests()
 {
     // __onlytest makes only one test get triggered
     foreach (get_class_methods(get_class($this)) as $method) {
         if (strtolower(substr($method, 0, 10)) == '__onlytest') {
             $this->reporter->paintSkip('All test methods besides ' . $method);
             return array($method);
         }
     }
     return parent::getTests();
 }
开发者ID:ajnok,项目名称:yii2book,代码行数:11,代码来源:Harness.php

示例3: getTests

 /**
  * Gets a list of test names. Normally that will be all internal methods that start with the
  * name "test". This method should be overridden if you want a different rule.
  *
  * @return array List of test names.
  * @access public
  */
 function getTests()
 {
     return array_merge(array('start', 'startCase'), array_diff(parent::getTests(), array('testAction', 'testaction')), array('endCase', 'end'));
 }
开发者ID:cls1991,项目名称:ryzomcore,代码行数:11,代码来源:cake_test_case.php

示例4: getTests

 /**
  * Gets a list of test names. Normally that will be all internal methods that start with the
  * name "test". This method should be overridden if you want a different rule.
  *
  * @return array	List of test names.
  *
  * @access public
  */
 function getTests()
 {
     $methods = array_diff(parent::getTests(), array('testAction', 'testaction'));
     $methods = array_merge(array_merge(array('start', 'startCase'), $methods), array('endCase', 'end'));
     return $methods;
 }
开发者ID:BLisa90,项目名称:cakecart,代码行数:14,代码来源:cake_test_case.php

示例5: getTests

 /**
  * You can use this to only run one test at a time for debugging.
  *
  * @return array
  */
 public function getTests()
 {
     //return array("testVoid");
     return parent::getTests();
 }
开发者ID:ironkeith,项目名称:moneris-eselectplus-api,代码行数:10,代码来源:basic.php


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