logicalAnd() public static method

Returns a PHPUnit_Framework_Constraint_And matcher object.
public static logicalAnd ( ) : PHPUnit_Framework_Constraint_And
return PHPUnit_Framework_Constraint_And
Esempio n. 1
0
/**
 * Returns a PHPUnit_Framework_Constraint_And matcher object.
 *
 * @return PHPUnit_Framework_Constraint_And
 * @since  Method available since Release 3.0.0
 */
function logicalAnd()
{
    return PHPUnit_Framework_Assert::logicalAnd();
}
Esempio n. 2
0
 public function toBeJson()
 {
     if ($this->negate) {
         a::assertThat($this->actual, a::logicalAnd(a::isType('string'), a::logicalNot(a::isJson())));
     } else {
         a::assertJson($this->actual);
     }
 }
function bodyMatchesJson($constraints)
{
    return Assert::logicalAnd(hasContentType('application/json'), bodyMatches(Assert::logicalAnd(Assert::isJson(), new JsonValueMatchesMany($constraints))));
}
 public static function bodyMatchesJson(array $constraints)
 {
     return Assert::logicalAnd(self::hasHeader('content-type', Assert::matchesRegularExpression(',^application/json(;.+)?$,')), self::bodyMatches(Assert::logicalAnd(Assert::isJson(), new JsonValueMatchesMany($constraints))));
 }