Exemplo n.º 1
0
 /**
  * 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());
     }
 }
Exemplo n.º 2
0
 /**
  * @return string
  */
 public function toString()
 {
     return 'method name ' . $this->constraint->toString();
 }
 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());
 }
Exemplo n.º 4
0
 /**
  * Returns a string representation of the constraint.
  *
  * @return string
  */
 public function toString()
 {
     return 'attribute "' . $this->attributeName . '" ' . $this->constraint->toString();
 }
 /**
  * Returns a string representation of the object.
  *
  * @return string
  */
 public function toString()
 {
     return "response status {$this->status->toString()}";
 }
Exemplo n.º 6
0
 public function __toString()
 {
     return $this->constraint->toString();
 }
Exemplo n.º 7
0
 /**
  * {@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());
 }
 /**
  * Returns a string representation of the object.
  *
  * @return string
  */
 public function toString()
 {
     return "matches " . $this->constraint->toString() . " at JSON path '{$this->jsonPath}'";
 }
 public function testConstraintDefinition()
 {
     self::assertEquals(1, count($this->constraint));
     self::assertEquals('is valid', $this->constraint->toString());
 }
 /**
  * Returns a string representation of the object.
  *
  * @return string
  */
 public function toString()
 {
     return "has header '{$this->name}' that {$this->constraint->toString()}";
 }
 /**
  * Returns a string representation of the object.
  *
  * @return string
  */
 public function toString()
 {
     return "message body matches " . $this->constraint->toString();
 }