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


PHP SimpleExpectation::test方法代码示例

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


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

示例1: assert

 /**
  *    Runs an expectation directly, for extending the
  *    tests with new expectation classes.
  *    @param SimpleExpectation $expectation  Expectation subclass.
  *    @param mixed $compare               Value to compare.
  *    @param string $message                 Message to display.
  *    @return boolean                        True on pass
  *    @access public
  */
 function assert(&$expectation, $compare, $message = '%s') {
     if ($expectation->test($compare)) {
         return $this->pass(sprintf(
                 $message,
                 $expectation->overlayMessage($compare, $this->_reporter->getDumper())));
     } else {
         return $this->fail(sprintf(
                 $message,
                 $expectation->overlayMessage($compare, $this->_reporter->getDumper())));
     }
 }
开发者ID:nuckey,项目名称:moodle,代码行数:20,代码来源:test_case.php

示例2: assertExpectation

 /**
  *    Runs an expectation directly, for extending the
  *    tests with new expectation classes.
  *    @param SimpleExpectation $expectation  Expectation subclass.
  *    @param mixed $test_value               Value to compare.
  *    @param string $message                 Message to display.
  *    @return boolean                        True on pass
  *    @access public
  */
 function assertExpectation(&$expectation, $test_value, $message = '%s')
 {
     return $this->assertTrue($expectation->test($test_value), sprintf($message, $expectation->overlayMessage($test_value)));
 }
开发者ID:radicaldesigns,项目名称:amp,代码行数:13,代码来源:simple_test.php

示例3: assert

 /**
  *    Runs an expectation directly, for extending the
  *    tests with new expectation classes.
  *    @param SimpleExpectation $expectation  Expectation subclass.
  *    @param mixed $compare               Value to compare.
  *    @param string $message                 Message to display.
  *    @return boolean                        True on pass
  *    @access public
  */
 function assert(&$expectation, $compare, $message = '%s')
 {
     return $this->assertTrue($expectation->test($compare), sprintf($message, $expectation->overlayMessage($compare)));
 }
开发者ID:sergrin,项目名称:crawlers-il,代码行数:13,代码来源:test_case.php

示例4: assertExpectation

 /**
  *    Runs an expectation directly, for extending the
  *    tests with new expectation classes.
  *    @param SimpleExpectation $expectation  Expectation subclass.
  *    @param mixed $test_value               Value to compare.
  *    @param string $message                 Message to display.
  *    @access public
  */
 function assertExpectation(&$expectation, $test_value, $message)
 {
     $this->assertTrue($expectation->test($test_value), sprintf($message, $expectation->testMessage($test_value)));
 }
开发者ID:printedheart,项目名称:iwfms,代码行数:12,代码来源:simple_test.php

示例5: checkExpectation

 /**
  *    Runs an expectation directly, taking a possibly expected fail
  *    into account by turning the tables then.
  *    @param SimpleExpectation $expectation  Expectation subclass.
  *    @param mixed $compare                  Value to compare.
  *    @return boolean                        True on pass / expected fail, false on fail / unexpected pass.
  *    @access public
  */
 function checkExpectation($expectation, $compare)
 {
     $rv = $expectation->test($compare);
     return $rv;
 }
开发者ID:GerHobbelt,项目名称:simpletest,代码行数:13,代码来源:test_case.php

示例6: assert

 /**
  * Runs an expectation directly, for extending the tests with new expectation classes.
  *
  * @param SimpleExpectation $expectation Expectation subclass.
  * @param mixed             $compare     Value to compare.
  * @param string            $message     Message to display.
  *
  * @return bool True on pass
  */
 public function assert($expectation, $compare, $message = '%s')
 {
     $message = $this->escapePercentageSignsExceptFirst($message);
     if ($expectation->test($compare)) {
         return $this->pass(sprintf($message, $expectation->overlayMessage($compare, $this->reporter->getDumper())));
     } else {
         return $this->fail(sprintf($message, $expectation->overlayMessage($compare, $this->reporter->getDumper())));
     }
 }
开发者ID:simpletest,项目名称:simpletest,代码行数:18,代码来源:test_case.php


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