本文整理汇总了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.');
}
}
示例2: checkRequirements
protected function checkRequirements()
{
if (null !== ($message = self::getConfig()->skipMessage(get_class($this), $this->getName(false)))) {
$this->markTestSkipped($message);
}
parent::checkRequirements();
}
示例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.');
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例6: checkRequirements
/**
* {@inheritdoc}
*/
protected function checkRequirements()
{
parent::checkRequirements();
$this->checkRequiredRedisServerVersion();
}