Guides
Tutorials
Asserts that the retrieved JSON contains the specified subset.This method delegates to static::assertArraySubset().
public assertJsonContains(array|string $subset, bool $checkForObjectIdentity, string $message): null
public assertJsonContains(array|string $subset, bool $checkForObjectIdentity, string $message): null
subset | array string | |
checkForObjectIdentity | bool | |
message | string |
null
Asserts that the retrieved JSON is equal to $json.Both values are canonicalized before the comparison.
public assertJsonEquals(array|string $json, string $message): null
public assertJsonEquals(array|string $json, string $message): null
json | array string | |
message | string |
null
Asserts that an array has a specified subset.Imported from dms/phpunit-arraysubset, because the original constraint has been deprecated.
public assertArraySubset(iterable $subset, iterable $array, bool $checkForObjectIdentity, string $message): null
public assertArraySubset(iterable $subset, iterable $array, bool $checkForObjectIdentity, string $message): null
subset | iterable | |
array | iterable | |
checkForObjectIdentity | bool | |
message | string |
null
public assertMatchesJsonSchema(object|array|string $jsonSchema, null|int $checkMode, string $message): null
public assertMatchesJsonSchema(object|array|string $jsonSchema, null|int $checkMode, string $message): null
jsonSchema | object array string | |
checkMode | int | |
message | string |
null
public assertMatchesResourceCollectionJsonSchema(string $resourceClass, null|string $operationName, string $format, null|array $serializationContext): null
public assertMatchesResourceCollectionJsonSchema(string $resourceClass, null|string $operationName, string $format, null|array $serializationContext): null
resourceClass | string | |
operationName | string | |
format | string | |
serializationContext | array |
null
public assertMatchesResourceItemJsonSchema(string $resourceClass, null|string $operationName, string $format, null|array $serializationContext): null
public assertMatchesResourceItemJsonSchema(string $resourceClass, null|string $operationName, string $format, null|array $serializationContext): null
resourceClass | string | |
operationName | string | |
format | string | |
serializationContext | array |
null
public assertResponseIsSuccessful(string $message): null
public assertResponseIsSuccessful(string $message): null
message | string |
null
public assertResponseStatusCodeSame(int $expectedCode, string $message): null
public assertResponseStatusCodeSame(int $expectedCode, string $message): null
expectedCode | int | |
message | string |
null
public assertResponseFormatSame(null|string $expectedFormat, string $message): null
public assertResponseFormatSame(null|string $expectedFormat, string $message): null
expectedFormat | string | |
message | string |
null
public assertResponseRedirects(null|string $expectedLocation, null|int $expectedCode, string $message): null
public assertResponseRedirects(null|string $expectedLocation, null|int $expectedCode, string $message): null
expectedLocation | string | |
expectedCode | int | |
message | string |
null
public assertResponseHasHeader(string $headerName, string $message): null
public assertResponseHasHeader(string $headerName, string $message): null
headerName | string | |
message | string |
null
public assertResponseNotHasHeader(string $headerName, string $message): null
public assertResponseNotHasHeader(string $headerName, string $message): null
headerName | string | |
message | string |
null
public assertResponseHeaderSame(string $headerName, string $expectedValue, string $message): null
public assertResponseHeaderSame(string $headerName, string $expectedValue, string $message): null
headerName | string | |
expectedValue | string | |
message | string |
null
public assertResponseHeaderNotSame(string $headerName, string $expectedValue, string $message): null
public assertResponseHeaderNotSame(string $headerName, string $expectedValue, string $message): null
headerName | string | |
expectedValue | string | |
message | string |
null
public assertResponseHasCookie(string $name, string $path, null|string $domain, string $message): null
public assertResponseHasCookie(string $name, string $path, null|string $domain, string $message): null
name | string | |
path | string | |
domain | string | |
message | string |
null
public assertResponseNotHasCookie(string $name, string $path, null|string $domain, string $message): null
public assertResponseNotHasCookie(string $name, string $path, null|string $domain, string $message): null
name | string | |
path | string | |
domain | string | |
message | string |
null
public assertResponseCookieValueSame(string $name, string $expectedValue, string $path, null|string $domain, string $message): null
public assertResponseCookieValueSame(string $name, string $expectedValue, string $path, null|string $domain, string $message): null
name | string | |
expectedValue | string | |
path | string | |
domain | string | |
message | string |
null
public assertResponseIsUnprocessable(string $message): null
public assertResponseIsUnprocessable(string $message): null
message | string |
null
public assertBrowserHasCookie(string $name, string $path, null|string $domain, string $message): null
public assertBrowserHasCookie(string $name, string $path, null|string $domain, string $message): null
name | string | |
path | string | |
domain | string | |
message | string |
null
public assertBrowserNotHasCookie(string $name, string $path, null|string $domain, string $message): null
public assertBrowserNotHasCookie(string $name, string $path, null|string $domain, string $message): null
name | string | |
path | string | |
domain | string | |
message | string |
null
public assertBrowserCookieValueSame(string $name, string $expectedValue, bool $raw, string $path, null|string $domain, string $message): null
public assertBrowserCookieValueSame(string $name, string $expectedValue, bool $raw, string $path, null|string $domain, string $message): null
name | string | |
expectedValue | string | |
raw | bool | |
path | string | |
domain | string | |
message | string |
null
public assertRequestAttributeValueSame(string $name, string $expectedValue, string $message): null
public assertRequestAttributeValueSame(string $name, string $expectedValue, string $message): null
name | string | |
expectedValue | string | |
message | string |
null
public assertRouteSame(string $expectedRoute, array $parameters, string $message): null
public assertRouteSame(string $expectedRoute, array $parameters, string $message): null
expectedRoute | string | |
parameters | array | |
message | string |
null
public assertThatForResponse(PHPUnit\Framework\Constraint\Constraint $constraint, string $message): null
public assertThatForResponse(PHPUnit\Framework\Constraint\Constraint $constraint, string $message): null
constraint | PHPUnit\Framework\Constraint\Constraint | |
message | string |
null
public assertThatForClient(PHPUnit\Framework\Constraint\Constraint $constraint, string $message): null
public assertThatForClient(PHPUnit\Framework\Constraint\Constraint $constraint, string $message): null
constraint | PHPUnit\Framework\Constraint\Constraint | |
message | string |
null