TestResponse class

Response wrapper with Laravel-style chainable assertions.

Constructors

TestResponse(int statusCode, String body, Map<String, String> headers)

Properties

body String
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
final
json → dynamic
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
final

Methods

assertCreated() TestResponse
assertForbidden() TestResponse
assertHeader(String name, String value) TestResponse
assertHeaderContains(String name, String fragment) TestResponse
assertJson(Map<String, Object?> subset) TestResponse
Every key in subset must be present in the JSON body with an equal value.
assertJsonMissingValidationErrors([List<String>? fields]) TestResponse
assertJsonPath(String path, Object? expected) TestResponse
assertJsonValidationErrors(List<String> fields) TestResponse
assertNoContent() TestResponse
assertNotFound() TestResponse
assertOk() TestResponse
assertRedirect([String? location]) TestResponse
assertSee(String text) TestResponse
assertStatus(int expected) TestResponse
assertUnauthorized() TestResponse
assertUnprocessable() TestResponse
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited