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


PHP PHPUnit_Framework_TestCase::checkRequirements方法代码示例

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


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

示例1: checkRequirements

 /**
  * This check forces these tests to only run on Travis.
  * If we can reliably start and stop web-push-testing-service and
  * detect current OS, we can probably run this automatically
  * for Linux and OS X at a later date.
  */
 protected function checkRequirements()
 {
     parent::checkRequirements();
     if (!(getenv('TRAVIS') || getenv('CI'))) {
         $this->markTestSkipped('This test does not run on Travis.');
     }
 }
开发者ID:minishlink,项目名称:web-push,代码行数:13,代码来源:PushServiceTest.php

示例2: checkRequirements

 protected function checkRequirements()
 {
     if (null !== ($message = self::getConfig()->skipMessage(get_class($this), $this->getName(false)))) {
         $this->markTestSkipped($message);
     }
     parent::checkRequirements();
 }
开发者ID:joelpittet,项目名称:Mink,代码行数:7,代码来源:TestCase.php

示例3: checkRequirements

 protected function checkRequirements()
 {
     parent::checkRequirements();
     if (getenv('TRAVIS') || getenv('CI')) {
         $this->markTestSkipped('This test does not run on Travis.');
     }
     if (!getenv('STANDARD_ENDPOINT')) {
         $this->markTestSkipped('No \'STANDARD_ENDPOINT\' found in env.');
     }
     if (!getenv('GCM_ENDPOINT')) {
         $this->markTestSkipped('No \'GCM_ENDPOINT\' found in env.');
     }
     if (!getenv('USER_PUBLIC_KEY')) {
         $this->markTestSkipped('No \'USER_PUBLIC_KEY\' found in env.');
     }
     if (!getenv('GCM_USER_PUBLIC_KEY')) {
         $this->markTestSkipped('No \'GCM_USER_PUBLIC_KEY\' found in env.');
     }
     if (!getenv('USER_AUTH_TOKEN')) {
         $this->markTestSkipped('No \'USER_PUBLIC_KEY\' found in env.');
     }
     if (!getenv('GCM_USER_AUTH_TOKEN')) {
         $this->markTestSkipped('No \'GCM_USER_AUTH_TOKEN\' found in env.');
     }
     if (!getenv('VAPID_PUBLIC_KEY')) {
         $this->markTestSkipped('No \'VAPID_PUBLIC_KEY\' found in env.');
     }
     if (!getenv('VAPID_PRIVATE_KEY')) {
         $this->markTestSkipped('No \'VAPID_PRIVATE_KEY\' found in env.');
     }
 }
开发者ID:minishlink,项目名称:web-push,代码行数:31,代码来源:WebPushTest.php

示例4: checkRequirements

 protected function checkRequirements()
 {
     parent::checkRequirements();
     // Core tests no longer check against open Trac tickets, but others using WP_UnitTestCase may do so.
     if (defined('WP_RUN_CORE_TESTS') && WP_RUN_CORE_TESTS) {
         return;
     }
     if (WP_TESTS_FORCE_KNOWN_BUGS) {
         return;
     }
     $tickets = PHPUnit_Util_Test::getTickets(get_class($this), $this->getName(false));
     foreach ($tickets as $ticket) {
         if (is_numeric($ticket)) {
             $this->knownWPBug($ticket);
         } elseif ('UT' == substr($ticket, 0, 2)) {
             $ticket = substr($ticket, 2);
             if ($ticket && is_numeric($ticket)) {
                 $this->knownUTBug($ticket);
             }
         } elseif ('Plugin' == substr($ticket, 0, 6)) {
             $ticket = substr($ticket, 6);
             if ($ticket && is_numeric($ticket)) {
                 $this->knownPluginBug($ticket);
             }
         }
     }
 }
开发者ID:dannyoz,项目名称:tls,代码行数:27,代码来源:testcase.php

示例5: checkRequirements

 protected function checkRequirements()
 {
     parent::checkRequirements();
     if (WP_TESTS_FORCE_KNOWN_BUGS) {
         return;
     }
     $tickets = PHPUnit_Util_Test::getTickets(get_class($this), $this->getName(false));
     foreach ($tickets as $ticket) {
         if (is_numeric($ticket)) {
             $this->knownWPBug($ticket);
         } elseif ('UT' == substr($ticket, 0, 2)) {
             $ticket = substr($ticket, 2);
             if ($ticket && is_numeric($ticket)) {
                 $this->knownUTBug($ticket);
             }
         } elseif ('Plugin' == substr($ticket, 0, 6)) {
             $ticket = substr($ticket, 6);
             if ($ticket && is_numeric($ticket)) {
                 $this->knownPluginBug($ticket);
             }
         }
     }
 }
开发者ID:jakejackson1,项目名称:gravityflow,代码行数:23,代码来源:testcase.php

示例6: checkRequirements

 /**
  * {@inheritdoc}
  */
 protected function checkRequirements()
 {
     parent::checkRequirements();
     $this->checkRequiredRedisServerVersion();
 }
开发者ID:pikniktech,项目名称:dailybriefweb2,代码行数:8,代码来源:PredisTestCase.php


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