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


PHP PHPUnit_Framework_Constraint::failureDescription方法代码示例

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


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

示例1: failureDescription

 /**
  * Returns the description of the failure
  *
  * The beginning of failure messages is "Failed asserting that" in most
  * cases. This method should return the second part of that sentence.
  *
  * @param mixed $other Evaluated value or object.
  *
  * @return string
  */
 protected function failureDescription($other)
 {
     switch (get_class($this->constraint)) {
         case 'PHPUnit_Framework_Constraint_And':
         case 'PHPUnit_Framework_Constraint_Not':
         case 'PHPUnit_Framework_Constraint_Or':
             return 'not( ' . $this->constraint->failureDescription($other) . ' )';
         default:
             return self::negate($this->constraint->failureDescription($other));
     }
 }
开发者ID:EnmanuelCode,项目名称:backend-laravel,代码行数:21,代码来源:Not.php

示例2: failureDescription

 /**
  * Returns the description of the failure
  *
  * The beginning of failure messages is "Failed asserting that" in most
  * cases. This method should return the second part of that sentence.
  *
  * @param  mixed  $other Evaluated value or object.
  * @return string
  */
 protected function failureDescription($other)
 {
     if (is_object($this->value) && is_object($other)) {
         return 'two variables reference the same object';
     }
     if (is_string($this->value) && is_string($other)) {
         return 'two strings are identical';
     }
     return parent::failureDescription($other);
 }
开发者ID:ronaldbao,项目名称:phpunit,代码行数:19,代码来源:IsIdentical.php

示例3: failureDescription

 /**
  * Adds compatibility to PHPUnit 3.6
  *
  * @param mixed $other
  * @return string
  */
 protected function failureDescription($other)
 {
     if (method_exists($this, 'customFailureDescription')) {
         return $this->customFailureDescription($other);
     }
     return parent::failureDescription($other);
 }
开发者ID:tiagosampaio,项目名称:EcomDev_PHPUnit,代码行数:13,代码来源:AbstractConstraint.php

示例4: failureDescription

 /**
  * Returns the description of the failure
  *
  * The beginning of failure messages is "Failed asserting that" in most
  * cases. This method should return the second part of that sentence.
  *
  * To provide additional failure information additionalFailureDescription
  * can be used.
  *
  * @param  mixed $other Evaluated value or object.
  * @return string
  */
 protected function failureDescription($other)
 {
     return $this->constraint->failureDescription($other);
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:16,代码来源:Config.php

示例5: failureDescription

 /**
  * Returns the description of the failure
  *
  * The beginning of failure messages is "Failed asserting that" in most
  * cases. This method should return the second part of that sentence.
  *
  * To provide additional failure information additionalFailureDescription
  * can be used.
  *
  * @param  mixed $other Evaluated value or object.
  * @return string
  */
 protected function failureDescription($other)
 {
     $nodeValue = $this->getNodeValue($other);
     return $this->constraint->failureDescription($nodeValue);
 }
开发者ID:tiagosampaio,项目名称:EcomDev_PHPUnit,代码行数:17,代码来源:Config.php


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