src/Concerns/HasHttpAssertions.php
public function assertError(int $status, array $error = [], bool $strict = true): self
    {
        $this->document = HttpAssert::assertError(
            $this->getStatusCode(),
            $this->getContentType(),
            $this->getContent(),
            $status,
            $error,
            $strict
        );

        return $this;
    }
public function assertError(int $status, array $error = [], bool $strict = true): self
    {
        $this->document = HttpAssert::assertError(
            $this->getStatusCode(),
            $this->getContentType(),
            $this->getContent(),
            $status,
            $error,
            $strict
        );

        return $this;
    }
Assert the document contains a single error that matches the supplied error.

@param int $status
@param array $error
@param bool $strict
@return $this