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


PHP PHPUnit_Framework_Constraint::fail方法代码示例

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


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

示例1: fail

 /**
  * @param   mixed   $other The value passed to evaluate() which failed the
  *                         constraint check.
  * @param   string  $description A string with extra description of what was
  *                               going on while the evaluation failed.
  * @param   boolean $not Flag to indicate negation.
  * @throws  PHPUnit_Framework_ExpectationFailedException
  */
 public function fail($other, $description, $not = FALSE)
 {
     if (count($this->constraint) == 1 || $this->constraint instanceof PHPUnit_Framework_Constraint_Attribute) {
         $this->constraint->fail($other, $description, TRUE);
     } else {
         parent::fail($other, $description, !$not);
     }
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:16,代码来源:Not.php

示例2: assertThat

 /**
  *
  *
  * @param  mixed                        $value
  * @param  PHPUnit_Framework_Constraint $constraint
  * @param  string                       $message
  * @access public
  * @static
  * @since  Method available since Release 3.0.0
  */
 public static function assertThat($value, PHPUnit_Framework_Constraint $constraint, $message = '')
 {
     if (!$constraint->evaluate($value)) {
         $constraint->fail($value, $message);
     }
 }
开发者ID:ahmedadham88,项目名称:enhanced-social-network,代码行数:16,代码来源:Assert.php

示例3: fail

 /**
  * @param   mixed   $other The value passed to evaluate() which failed the
  *                         constraint check.
  * @param   string  $description A string with extra description of what was
  *                               going on while the evaluation failed.
  * @param   boolean $not Flag to indicate negation.
  * @throws  PHPUnit_Framework_ExpectationFailedException
  */
 public function fail($other, $description, $not = FALSE)
 {
     parent::fail(PHPUnit_Framework_Assert::readAttribute($other, $this->attributeName), $description, $not);
 }
开发者ID:453111208,项目名称:bbc,代码行数:12,代码来源:Attribute.php

示例4: fail

 /**
  * @param   mixed   $other The value passed to evaluate() which failed the
  *                         constraint check.
  * @param   string  $description A string with extra description of what was
  *                               going on while the evaluation failed.
  * @param   boolean $not Flag to indicate negation.
  * @throws  PHPUnit_Framework_ExpectationFailedException
  */
 public function fail($other, $description, $not = FALSE)
 {
     $this->lastConstraint->fail($other, $description, $not);
 }
开发者ID:KnpLabs,项目名称:phpunit-easyinstall,代码行数:12,代码来源:And.php

示例5: assertThat

 /**
  *
  *
  * @param  mixed                        $value
  * @param  PHPUnit_Framework_Constraint $constraint
  * @param  string                       $message
  * @since  Method available since Release 3.0.0
  */
 public static function assertThat($value, PHPUnit_Framework_Constraint $constraint, $message = '')
 {
     $stack = debug_backtrace();
     for ($i = 1; $i <= 2; $i++) {
         if (isset($stack[$i]['object']) && $stack[$i]['object'] instanceof PHPUnit_Framework_TestCase) {
             $test = $stack[$i]['object'];
         }
     }
     if (isset($test)) {
         $test->incrementAssertionCounter();
     }
     if (!$constraint->evaluate($value)) {
         $constraint->fail($value, $message);
     }
 }
开发者ID:xiplias,项目名称:pails,代码行数:23,代码来源:Assert.php

示例6: fail

 /**
  * {@inheritdoc}
  * @see PHPUnit_Framework_Constraint::fail()
  */
 public function fail($other, $description, \PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
 {
     parent::fail($other[$this->arrayKey], $description, $comparisonFailure);
 }
开发者ID:rickb838,项目名称:scalr,代码行数:8,代码来源:ArrayHas.php

示例7: fail

 /**
  * @todo
  * 
  * @param mixed   $other
  * @param string  $description
  * @param boolean $not
  */
 public function fail($other, $description, $not)
 {
     $nodeValue = $this->getNodeValue($other);
     return $this->constraint->fail($nodeValue, $description, $not);
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:12,代码来源:Config.php

示例8: fail

 /**
  * Failure generator
  *
  * @param mixed $other
  * @param string $description
  * @param \SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure
  */
 public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = NULL)
 {
     $nodeValue = $this->getNodeValue($other);
     return $this->constraint->fail($nodeValue, $description, $comparisonFailure);
 }
开发者ID:tiagosampaio,项目名称:EcomDev_PHPUnit,代码行数:12,代码来源:Config.php


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