當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。