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


PHP PHPUnit_Framework_TestResult::allCompletlyImplemented方法代码示例

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


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

示例1: printFooter

 /**
  * @param  PHPUnit_Framework_TestResult  $result
  * @access protected
  */
 protected function printFooter(PHPUnit_Framework_TestResult $result)
 {
     if ($result->wasSuccessful() && $result->allCompletlyImplemented() && $result->noneSkipped()) {
         $this->write("\n[1;37;42m" . ($result = sprintf("OK (%d test%s, %d assertion%s)", count($result), count($result) == 1 ? '' : 's', $this->numAssertions, $this->numAssertions == 1 ? '' : 's')) . str_repeat(' ', 80 - strlen($result)) . "[0m\n");
     } elseif ((!$result->allCompletlyImplemented() || !$result->noneSkipped()) && $result->wasSuccessful()) {
         $this->write("\n[1;37;43mOk, but incomplete or skipped tests!                                            [0m\n" . sprintf("Tests: %d, Assertions: %d%s%s.\n", count($result), $this->numAssertions, $this->getCountString($result->notImplementedCount(), 'Incomplete'), $this->getCountString($result->skippedCount(), 'Skipped')));
     } else {
         $this->write(sprintf("\n[1;37;41mFailures                                                                        [m\n" . "Tests: %d, Assertions: %s%s%s%s.\n", count($result), $this->numAssertions, $this->getCountString($result->failureCount(), 'Failures'), $this->getCountString($result->errorCount(), 'Errors'), $this->getCountString($result->notImplementedCount(), 'Incomplete'), $this->getCountString($result->skippedCount(), 'Skipped')));
     }
 }
开发者ID:kore,项目名称:arbit-result-printer,代码行数:14,代码来源:printer.php

示例2: printFooter

 /**
  * @param  PHPUnit_Framework_TestResult  $result
  */
 protected function printFooter(PHPUnit_Framework_TestResult $result)
 {
     if ($result->wasSuccessful() && $result->allCompletlyImplemented() && $result->noneSkipped()) {
         if ($this->colors) {
             $this->write("[30;42m[2K");
         }
         $this->write(sprintf("OK (%d test%s, %d assertion%s)\n", count($result), count($result) == 1 ? '' : 's', $this->numAssertions, $this->numAssertions == 1 ? '' : 's'));
         if ($this->colors) {
             $this->write("[0m[2K");
         }
     } else {
         if ((!$result->allCompletlyImplemented() || !$result->noneSkipped()) && $result->wasSuccessful()) {
             if ($this->colors) {
                 $this->write("[30;43m[2KOK, but incomplete or skipped tests!\n" . "[0m[30;43m[2K");
             } else {
                 $this->write("OK, but incomplete or skipped tests!\n");
             }
             $this->write(sprintf("Tests: %d, Assertions: %d%s%s.\n", count($result), $this->numAssertions, $this->getCountString($result->notImplementedCount(), 'Incomplete'), $this->getCountString($result->skippedCount(), 'Skipped')));
             if ($this->colors) {
                 $this->write("[0m[2K");
             }
         } else {
             $this->write("\n");
             if ($this->colors) {
                 $this->write("[37;41m[2KFAILURES!\n[0m[37;41m[2K");
             } else {
                 $this->write("FAILURES!\n");
             }
             $this->write(sprintf("Tests: %d, Assertions: %s%s%s%s%s.\n", count($result), $this->numAssertions, $this->getCountString($result->failureCount(), 'Failures'), $this->getCountString($result->errorCount(), 'Errors'), $this->getCountString($result->notImplementedCount(), 'Incomplete'), $this->getCountString($result->skippedCount(), 'Skipped')));
             if ($this->colors) {
                 $this->write("[0m[2K");
             }
         }
     }
     if (!$this->verbose && $result->deprecatedFeaturesCount() > 0) {
         $message = sprintf("Warning: Deprecated PHPUnit features are being used %s times!\n" . "Use --verbose for more information.\n", $result->deprecatedFeaturesCount());
         if ($this->colors) {
             $message = "[37;41m[2K" . $message . "[0m";
         }
         $this->write("\n" . $message);
     }
 }
开发者ID:qcodo,项目名称:qcodo,代码行数:45,代码来源:ResultPrinter.php

示例3: printFooter

 /**
  * @param  PHPUnit_Framework_TestResult  $result
  */
 protected function printFooter(PHPUnit_Framework_TestResult $result)
 {
     if ($result->wasSuccessful() && $result->allCompletlyImplemented() && $result->noneSkipped()) {
         if ($this->colors) {
             $this->write("[30;42m[2K");
         }
         $this->write(sprintf("OK (%d test%s, %d assertion%s)\n", count($result), count($result) == 1 ? '' : 's', $this->numAssertions, $this->numAssertions == 1 ? '' : 's'));
         if ($this->colors) {
             $this->write("[0m[2K");
         }
     } else {
         if ((!$result->allCompletlyImplemented() || !$result->noneSkipped()) && $result->wasSuccessful()) {
             if ($this->colors) {
                 $this->write("[30;43m[2KOK, but incomplete or skipped tests!\n" . "[0m[30;43m[2K");
             } else {
                 $this->write("OK, but incomplete or skipped tests!\n");
             }
             $this->write(sprintf("Tests: %d, Assertions: %d%s%s.\n", count($result), $this->numAssertions, $this->getCountString($result->notImplementedCount(), 'Incomplete'), $this->getCountString($result->skippedCount(), 'Skipped')));
             if ($this->colors) {
                 $this->write("[0m[2K");
             }
         } else {
             $this->write("\n");
             if ($this->colors) {
                 $this->write("[37;41m[2KFAILURES!\n[0m[37;41m[2K");
             } else {
                 $this->write("FAILURES!\n");
             }
             $this->write(sprintf("Tests: %d, Assertions: %s%s%s%s%s.\n", count($result), $this->numAssertions, $this->getCountString($result->failureCount(), 'Failures'), $this->getCountString($result->errorCount(), 'Errors'), $this->getCountString($result->notImplementedCount(), 'Incomplete'), $this->getCountString($result->skippedCount(), 'Skipped')));
             if ($this->colors) {
                 $this->write("[0m[2K");
             }
         }
     }
 }
开发者ID:pavan-git,项目名称:visualphpunit,代码行数:38,代码来源:ResultPrinter.php

示例4: printFooter

 /**
  * @param  PHPUnit_Framework_TestResult  $result
  * @access protected
  */
 protected function printFooter(PHPUnit_Framework_TestResult $result)
 {
     if ($result->wasSuccessful() && $result->allCompletlyImplemented() && $result->noneSkipped()) {
         $this->write(sprintf("\nOK (%d test%s)\n", count($result), count($result) == 1 ? '' : 's'));
     } else {
         if ((!$result->allCompletlyImplemented() || !$result->noneSkipped()) && $result->wasSuccessful()) {
             $this->write(sprintf("\nOK, but incomplete or skipped tests!\n" . "Tests: %d%s%s.\n", count($result), $this->getCountString($result->notImplementedCount(), 'Incomplete'), $this->getCountString($result->skippedCount(), 'Skipped')));
         } else {
             $this->write(sprintf("\nFAILURES!\n" . "Tests: %d%s%s%s%s.\n", count($result), $this->getCountString($result->failureCount(), 'Failures'), $this->getCountString($result->errorCount(), 'Errors'), $this->getCountString($result->notImplementedCount(), 'Incomplete'), $this->getCountString($result->skippedCount(), 'Skipped')));
         }
     }
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:16,代码来源:ResultPrinter.php

示例5: printResult

 public function printResult(\PHPUnit_Framework_TestResult $result)
 {
     $upLine = str_repeat($this->colors ? '▁' : '-', $this->maxColumns);
     $dnLine = str_repeat($this->colors ? '▔' : '-', $this->maxColumns);
     $arrow = $this->colors ? '❯' : '=>';
     $this->printFailures();
     if (!count($this->exceptions)) {
         $ch = $this->colors ? ' ✔' : '';
         $upLine = "[32m" . $upLine . "\n[0m";
         $dnLine = "[32m" . $dnLine . "\n[0m";
         $str = "[32m{$ch}[0m OK {$arrow} Passed %s of %s";
         $str = sprintf($str, count($result->passed()), $result->count());
     } else {
         $ch = $this->colors ? ' ✖' : '';
         $upLine = "[31m" . $upLine . "\n[0m";
         $dnLine = "[31m" . $dnLine . "\n[0m";
         $str = "[31m{$ch}[0m KO {$arrow} Failed %s of %s";
         $str = sprintf($str, $result->failureCount() + $result->errorCount(), $result->count());
     }
     if (!$result->allCompletlyImplemented()) {
         $pair = array();
         if ($result->notImplementedCount() > 0) {
             $pair[] = $result->notImplementedCount() . ' not implemented';
         }
         if ($result->skippedCount() > 0) {
             $pair[] = $result->skippedCount() . ' skipped';
         }
         $str .= " with " . implode(' and ', $pair);
     }
     // Calculate time and peak memory usage
     $time = number_format($result->time(), 2);
     $mem = memory_get_peak_usage();
     $mem = round($mem / 1024 / 1024);
     // Add time spent
     $str .= " [30;1m({$time}s {$mem}Mb)\n[0m";
     // Clean up the line above and print there
     $this->write("[1A[2K");
     $this->write($upLine);
     $this->write($str);
     $this->write($dnLine);
 }
开发者ID:rafeca,项目名称:Spec-PHP,代码行数:41,代码来源:ResultPrinter.php

示例6: printFooter

 /**
  * @param  PHPUnit_Framework_TestResult  $result
  * @access protected
  */
 protected function printFooter(PHPUnit_Framework_TestResult $result)
 {
     if ($result->wasSuccessful() && $result->allCompletlyImplemented() && $result->noneSkipped()) {
         $this->write(sprintf("<tfoot><tr style='background-color: green'><td colspan='5'>OK (%d test%s)</td>/<tr></tfoot>", count($result), count($result) == 1 ? '' : 's'));
     } else {
         if ((!$result->allCompletlyImplemented() || !$result->noneSkipped()) && $result->wasSuccessful()) {
             $this->write(sprintf("<tfoot><tr style='background-color: yellow'><td colspan='5'>OK, but incomplete or skipped tests! Tests: %d%s%s.</td>/<tr></tfoot>", count($result), $this->getCountString($result->notImplementedCount(), 'Incomplete'), $this->getCountString($result->skippedCount(), 'Skipped')));
         } else {
             $this->write(sprintf("<tfoot><tr style='background-color: red'><td colspan='5'>FAILURES ! Tests: %d%s%s.</td>/<tr></tfoot>", count($result), $this->getCountString($result->failureCount(), 'Failures'), $this->getCountString($result->errorCount(), 'Errors'), $this->getCountString($result->notImplementedCount(), 'Incomplete'), $this->getCountString($result->skippedCount(), 'Skipped')));
         }
     }
     $this->write('</table>');
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:17,代码来源:CopixTestPrinter.class.php


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