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): nullpublic 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): nullpublic 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): nullpublic 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): nullpublic 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): nullpublic 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): nullpublic 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): nullpublic assertResponseIsSuccessful(string $message): null| message | string |
null
public assertResponseStatusCodeSame(int $expectedCode, string $message): nullpublic assertResponseStatusCodeSame(int $expectedCode, string $message): null| expectedCode | int | |
| message | string |
null
public assertResponseFormatSame(null|string $expectedFormat, string $message): nullpublic assertResponseFormatSame(null|string $expectedFormat, string $message): null| expectedFormat | string | |
| message | string |
null
public assertResponseRedirects(null|string $expectedLocation, null|int $expectedCode, string $message): nullpublic assertResponseRedirects(null|string $expectedLocation, null|int $expectedCode, string $message): null| expectedLocation | string | |
| expectedCode | int | |
| message | string |
null
public assertResponseHasHeader(string $headerName, string $message): nullpublic assertResponseHasHeader(string $headerName, string $message): null| headerName | string | |
| message | string |
null
public assertResponseNotHasHeader(string $headerName, string $message): nullpublic assertResponseNotHasHeader(string $headerName, string $message): null| headerName | string | |
| message | string |
null
public assertResponseHeaderSame(string $headerName, string $expectedValue, string $message): nullpublic assertResponseHeaderSame(string $headerName, string $expectedValue, string $message): null| headerName | string | |
| expectedValue | string | |
| message | string |
null
public assertResponseHeaderNotSame(string $headerName, string $expectedValue, string $message): nullpublic 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): nullpublic 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): nullpublic 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): nullpublic 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): nullpublic assertResponseIsUnprocessable(string $message): null| message | string |
null
public assertBrowserHasCookie(string $name, string $path, null|string $domain, string $message): nullpublic 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): nullpublic 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): nullpublic 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): nullpublic assertRequestAttributeValueSame(string $name, string $expectedValue, string $message): null| name | string | |
| expectedValue | string | |
| message | string |
null
public assertRouteSame(string $expectedRoute, array $parameters, string $message): nullpublic assertRouteSame(string $expectedRoute, array $parameters, string $message): null| expectedRoute | string | |
| parameters | array | |
| message | string |
null
public assertThatForResponse(PHPUnit\Framework\Constraint\Constraint $constraint, string $message): nullpublic 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): nullpublic assertThatForClient(PHPUnit\Framework\Constraint\Constraint $constraint, string $message): null| constraint | PHPUnit\Framework\Constraint\Constraint | |
| message | string |
null