當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PHPUnit_Util_Test::getTickets方法代碼示例

本文整理匯總了PHP中PHPUnit_Util_Test::getTickets方法的典型用法代碼示例。如果您正苦於以下問題:PHP PHPUnit_Util_Test::getTickets方法的具體用法?PHP PHPUnit_Util_Test::getTickets怎麽用?PHP PHPUnit_Util_Test::getTickets使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PHPUnit_Util_Test的用法示例。


在下文中一共展示了PHPUnit_Util_Test::getTickets方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: 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

示例2: endTest

 /**
  * A test ended.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  float                  $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if (!$test instanceof PHPUnit_Framework_Warning) {
         if ($test->getStatus() == PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) {
             $ifStatus = array('assigned', 'new', 'reopened');
             $newStatus = 'closed';
             $message = 'Automatically closed by PHPUnit (test passed).';
             $resolution = 'fixed';
             $cumulative = TRUE;
         } else {
             if ($test->getStatus() == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) {
                 $ifStatus = array('closed');
                 $newStatus = 'reopened';
                 $message = 'Automatically reopened by PHPUnit (test failed).';
                 $resolution = '';
                 $cumulative = FALSE;
             } else {
                 return;
             }
         }
         $name = $test->getName();
         $tickets = PHPUnit_Util_Test::getTickets(get_class($test), $name);
         foreach ($tickets as $ticket) {
             // Remove this test from the totals (if it passed).
             if ($test->getStatus() == PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) {
                 unset($this->ticketCounts[$ticket][$name]);
             }
             // Only close tickets if ALL referenced cases pass
             // but reopen tickets if a single test fails.
             if ($cumulative) {
                 // Determine number of to-pass tests:
                 if (count($this->ticketCounts[$ticket]) > 0) {
                     // There exist remaining test cases with this reference.
                     $adjustTicket = FALSE;
                 } else {
                     // No remaining tickets, go ahead and adjust.
                     $adjustTicket = TRUE;
                 }
             } else {
                 $adjustTicket = TRUE;
             }
             if ($adjustTicket && in_array($ticketInfo[3]['status'], $ifStatus)) {
                 $this->updateTicket($ticket, $newStatus, $message, $resolution);
             }
         }
     }
 }
開發者ID:nblackman,項目名稱:pimcore,代碼行數:53,代碼來源:TicketListener.php

示例3: 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


注:本文中的PHPUnit_Util_Test::getTickets方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。