本文整理汇总了PHP中PHPUnit_Framework_Constraint::toString方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_Constraint::toString方法的具体用法?PHP PHPUnit_Framework_Constraint::toString怎么用?PHP PHPUnit_Framework_Constraint::toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Framework_Constraint
的用法示例。
在下文中一共展示了PHPUnit_Framework_Constraint::toString方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toString
/**
* Returns a string representation of the constraint.
*
* @return string
*/
public function toString()
{
switch (get_class($this->constraint)) {
case 'PHPUnit_Framework_Constraint_And':
case 'PHPUnit_Framework_Constraint_Not':
case 'PHPUnit_Framework_Constraint_Or':
return 'not( ' . $this->constraint->toString() . ' )';
default:
return self::negate($this->constraint->toString());
}
}
示例2: toString
/**
* @return string
*/
public function toString()
{
return 'method name ' . $this->constraint->toString();
}
示例3: testConstraintDefinition
public function testConstraintDefinition()
{
self::assertEquals(1, count($this->constraint));
self::assertEquals('is an allowed media type (application/json, application/xml, text/xml, text/html)', $this->constraint->toString());
}
示例4: toString
/**
* Returns a string representation of the constraint.
*
* @return string
*/
public function toString()
{
return 'attribute "' . $this->attributeName . '" ' . $this->constraint->toString();
}
示例5: toString
/**
* Returns a string representation of the object.
*
* @return string
*/
public function toString()
{
return "response status {$this->status->toString()}";
}
示例6: __toString
public function __toString()
{
return $this->constraint->toString();
}
示例7: toString
/**
* {@inheritdoc}
* @see PHPUnit_Framework_SelfDescribing::toString()
*/
public function toString()
{
return sprintf('the value of key "%s"(%s) %s', $this->arrayKey, $this->value, $this->constraint->toString());
}
示例8: toString
/**
* Returns a string representation of the object.
*
* @return string
*/
public function toString()
{
return "matches " . $this->constraint->toString() . " at JSON path '{$this->jsonPath}'";
}
示例9: toString
/**
* Returns a string representation of the object.
*
* @return string
*/
public function toString()
{
return "has header '{$this->name}' that {$this->constraint->toString()}";
}
示例10: toString
/**
* Returns a string representation of the object.
*
* @return string
*/
public function toString()
{
return "message body matches " . $this->constraint->toString();
}